diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2021-12-01 19:44:23 +0200 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2021-12-01 19:47:04 +0200 |
commit | 6f194f12a2e30aad7da347848f7b0187e188f983 (patch) | |
tree | 9a58cba1af2bfccf5d92b153048687438e8011cb /dev-python/argh | |
parent | dev-python/argh: add github upstream metadata (diff) | |
download | gentoo-6f194f12a2e30aad7da347848f7b0187e188f983.tar.gz gentoo-6f194f12a2e30aad7da347848f7b0187e188f983.tar.bz2 gentoo-6f194f12a2e30aad7da347848f7b0187e188f983.zip |
dev-python/argh: partial tests fix
Fix two of 4 tests failures. Other two happen only on python-3.9.8
and not any later version, so will auto fix itself with time. See
bug for more info.
Bug: https://bugs.gentoo.org/823832
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/argh')
-rw-r--r-- | dev-python/argh/argh-0.26.2-r2.ebuild | 6 | ||||
-rw-r--r-- | dev-python/argh/files/argh-0.26.2-fix-py3.9-msgs.patch | 31 |
2 files changed, 36 insertions, 1 deletions
diff --git a/dev-python/argh/argh-0.26.2-r2.ebuild b/dev-python/argh/argh-0.26.2-r2.ebuild index 65fa34c728af..a596f642c0c6 100644 --- a/dev-python/argh/argh-0.26.2-r2.ebuild +++ b/dev-python/argh/argh-0.26.2-r2.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{7..10} pypy3 ) +PYTHON_COMPAT=( python3_{8..10} pypy3 ) inherit distutils-r1 @@ -21,4 +21,8 @@ BDEPEND=" dev-python/mock[${PYTHON_USEDEP}] )" +PATCHES=( + "${FILESDIR}/${P}-fix-py3.9-msgs.patch" +) + distutils_enable_tests pytest diff --git a/dev-python/argh/files/argh-0.26.2-fix-py3.9-msgs.patch b/dev-python/argh/files/argh-0.26.2-fix-py3.9-msgs.patch new file mode 100644 index 000000000000..5835c5acbb8e --- /dev/null +++ b/dev-python/argh/files/argh-0.26.2-fix-py3.9-msgs.patch @@ -0,0 +1,31 @@ +diff --git a/test/test_integration.py b/test/test_integration.py +index 8899d8e..589f6d6 100644 +--- a/test/test_integration.py ++++ b/test/test_integration.py +@@ -377,7 +377,7 @@ def test_invalid_choice(): + p = DebugArghParser() + p.add_commands([cmd]) + +- assert run(p, 'bar', exit=True).startswith('invalid choice') ++ assert 'invalid choice' in run(p, 'bar', exit=True) + + if sys.version_info < (3,3): + # Python before 3.3 exits with a less informative error +@@ -391,7 +391,7 @@ def test_invalid_choice(): + p = DebugArghParser() + p.add_commands([cmd], namespace='nest') + +- assert run(p, 'nest bar', exit=True).startswith('invalid choice') ++ assert 'invalid choice' in run(p, 'nest bar', exit=True) + + if sys.version_info < (3,3): + # Python before 3.3 exits with a less informative error +@@ -511,7 +511,7 @@ def test_explicit_cmd_name(): + + p = DebugArghParser() + p.add_commands([orig_name]) +- assert run(p, 'orig-name', exit=True).startswith('invalid choice') ++ assert 'invalid choice' in run(p, 'orig-name', exit=True) + assert run(p, 'new-name').out == 'ok\n' + + |