diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-10-31 12:23:42 +0100 |
|---|---|---|
| committer | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-11-02 15:09:03 +0100 |
| commit | 4f2fdcb5030a2158bcdb25b69ad8b2466d0fefd3 (patch) | |
| tree | 22987a84b2dd5d2a556093972640dbe8ba515186 /meta-python | |
| parent | 53cb1f213c3c91fd8e9f20e960a70c5e67de210f (diff) | |
| download | meta-openembedded-4f2fdcb5030a2158bcdb25b69ad8b2466d0fefd3.tar.gz | |
python3-aspectlib: fix ptests
Backport patch that adapts failing tests.
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Diffstat (limited to 'meta-python')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-aspectlib/0001-fix-failing-ptests.patch | 54 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-aspectlib_1.5.2.bb | 1 |
2 files changed, 55 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-aspectlib/0001-fix-failing-ptests.patch b/meta-python/recipes-devtools/python/python3-aspectlib/0001-fix-failing-ptests.patch new file mode 100644 index 0000000000..8c07da67f0 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-aspectlib/0001-fix-failing-ptests.patch | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | From 2b1e16fa9de6f444ed42c89b8d689e2607b6e358 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 3 | Date: Sun, 19 Oct 2025 17:05:35 +0200 | ||
| 4 | Subject: [PATCH] fix failing ptests | ||
| 5 | |||
| 6 | Some error messages in Python now include the classname also, so | ||
| 7 | prepare the tests to expect these errors instead of the old version. | ||
| 8 | |||
| 9 | This patch is the backport of a very small portion of this change: | ||
| 10 | https://github.com/ionelmc/python-aspectlib/commit/ed4b036b9e69e195226faab719c470f77ad11cc2 | ||
| 11 | |||
| 12 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 13 | --- | ||
| 14 | tests/test_aspectlib_test.py | 8 ++++---- | ||
| 15 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/tests/test_aspectlib_test.py b/tests/test_aspectlib_test.py | ||
| 18 | index 05e2c25..db315a2 100644 | ||
| 19 | --- a/tests/test_aspectlib_test.py | ||
| 20 | +++ b/tests/test_aspectlib_test.py | ||
| 21 | @@ -414,14 +414,14 @@ def test_story_empty_play_proxy_class(): | ||
| 22 | (('stuff_1', 'mix', "'a', 'b'", ''), _Returns("(1, 2, 'a', 'b')")), | ||
| 23 | (('stuff_1', 'meth', "123", ''), _Raises(repr_ex(TypeError( | ||
| 24 | 'meth() takes exactly 1 argument (2 given)' if PY2 else | ||
| 25 | - 'meth() takes 1 positional argument but 2 were given' | ||
| 26 | + 'Stuff.meth() takes 1 positional argument but 2 were given' | ||
| 27 | )))), | ||
| 28 | ((None, 'test_pkg1.test_pkg2.test_mod.Stuff', "0, 1", ''), _Binds('stuff_2')), | ||
| 29 | (('stuff_2', 'mix', "'a', 'b'", ''), _Returns("(0, 1, 'a', 'b')")), | ||
| 30 | (('stuff_2', 'mix', "3, 4", ''), _Returns("(0, 1, 3, 4)")), | ||
| 31 | (('stuff_2', 'meth', "123", ''), _Raises(repr_ex(TypeError( | ||
| 32 | 'meth() takes exactly 1 argument (2 given)' if PY2 else | ||
| 33 | - 'meth() takes 1 positional argument but 2 were given' | ||
| 34 | + 'Stuff.meth() takes 1 positional argument but 2 were given' | ||
| 35 | )))) | ||
| 36 | ])) | ||
| 37 | |||
| 38 | @@ -449,14 +449,14 @@ def test_story_half_play_proxy_class(): | ||
| 39 | (('stuff_1', 'meth', '', ''), _Returns('None')), | ||
| 40 | (('stuff_1', 'meth', '123', ''), _Raises(repr_ex(TypeError( | ||
| 41 | 'meth() takes exactly 1 argument (2 given)' if PY2 else | ||
| 42 | - 'meth() takes 1 positional argument but 2 were given' | ||
| 43 | + 'Stuff.meth() takes 1 positional argument but 2 were given' | ||
| 44 | )))), | ||
| 45 | ((None, 'test_pkg1.test_pkg2.test_mod.Stuff', '0, 1', ''), _Binds("stuff_2")), | ||
| 46 | (('stuff_2', 'mix', "'a', 'b'", ''), _Returns("(0, 1, 'a', 'b')")), | ||
| 47 | (('stuff_2', 'mix', '3, 4', ''), _Returns('(0, 1, 3, 4)')), | ||
| 48 | (('stuff_2', 'meth', '123', ''), _Raises(repr_ex(TypeError( | ||
| 49 | 'meth() takes exactly 1 argument (2 given)' if PY2 else | ||
| 50 | - 'meth() takes 1 positional argument but 2 were given' | ||
| 51 | + 'Stuff.meth() takes 1 positional argument but 2 were given' | ||
| 52 | )))) | ||
| 53 | ])) | ||
| 54 | |||
diff --git a/meta-python/recipes-devtools/python/python3-aspectlib_1.5.2.bb b/meta-python/recipes-devtools/python/python3-aspectlib_1.5.2.bb index 0cbeca21c7..ba4baefaf9 100644 --- a/meta-python/recipes-devtools/python/python3-aspectlib_1.5.2.bb +++ b/meta-python/recipes-devtools/python/python3-aspectlib_1.5.2.bb | |||
| @@ -12,6 +12,7 @@ inherit ptest pypi setuptools3 | |||
| 12 | 12 | ||
| 13 | SRC_URI += "file://run-ptest \ | 13 | SRC_URI += "file://run-ptest \ |
| 14 | file://0001-Remove-tornado-6-test-constraint.-Ref-15.patch \ | 14 | file://0001-Remove-tornado-6-test-constraint.-Ref-15.patch \ |
| 15 | file://0001-fix-failing-ptests.patch \ | ||
| 15 | " | 16 | " |
| 16 | 17 | ||
| 17 | do_install_ptest() { | 18 | do_install_ptest() { |
