1 |
commit: 6f194f12a2e30aad7da347848f7b0187e188f983 |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 1 17:44:23 2021 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 1 17:47:04 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f194f12 |
7 |
|
8 |
dev-python/argh: partial tests fix |
9 |
|
10 |
Fix two of 4 tests failures. Other two happen only on python-3.9.8 |
11 |
and not any later version, so will auto fix itself with time. See |
12 |
bug for more info. |
13 |
|
14 |
Bug: https://bugs.gentoo.org/823832 |
15 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
16 |
|
17 |
dev-python/argh/argh-0.26.2-r2.ebuild | 6 ++++- |
18 |
.../argh/files/argh-0.26.2-fix-py3.9-msgs.patch | 31 ++++++++++++++++++++++ |
19 |
2 files changed, 36 insertions(+), 1 deletion(-) |
20 |
|
21 |
diff --git a/dev-python/argh/argh-0.26.2-r2.ebuild b/dev-python/argh/argh-0.26.2-r2.ebuild |
22 |
index 65fa34c728af..a596f642c0c6 100644 |
23 |
--- a/dev-python/argh/argh-0.26.2-r2.ebuild |
24 |
+++ b/dev-python/argh/argh-0.26.2-r2.ebuild |
25 |
@@ -3,7 +3,7 @@ |
26 |
|
27 |
EAPI=7 |
28 |
|
29 |
-PYTHON_COMPAT=( python3_{7..10} pypy3 ) |
30 |
+PYTHON_COMPAT=( python3_{8..10} pypy3 ) |
31 |
|
32 |
inherit distutils-r1 |
33 |
|
34 |
@@ -21,4 +21,8 @@ BDEPEND=" |
35 |
dev-python/mock[${PYTHON_USEDEP}] |
36 |
)" |
37 |
|
38 |
+PATCHES=( |
39 |
+ "${FILESDIR}/${P}-fix-py3.9-msgs.patch" |
40 |
+) |
41 |
+ |
42 |
distutils_enable_tests pytest |
43 |
|
44 |
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 |
45 |
new file mode 100644 |
46 |
index 000000000000..5835c5acbb8e |
47 |
--- /dev/null |
48 |
+++ b/dev-python/argh/files/argh-0.26.2-fix-py3.9-msgs.patch |
49 |
@@ -0,0 +1,31 @@ |
50 |
+diff --git a/test/test_integration.py b/test/test_integration.py |
51 |
+index 8899d8e..589f6d6 100644 |
52 |
+--- a/test/test_integration.py |
53 |
++++ b/test/test_integration.py |
54 |
+@@ -377,7 +377,7 @@ def test_invalid_choice(): |
55 |
+ p = DebugArghParser() |
56 |
+ p.add_commands([cmd]) |
57 |
+ |
58 |
+- assert run(p, 'bar', exit=True).startswith('invalid choice') |
59 |
++ assert 'invalid choice' in run(p, 'bar', exit=True) |
60 |
+ |
61 |
+ if sys.version_info < (3,3): |
62 |
+ # Python before 3.3 exits with a less informative error |
63 |
+@@ -391,7 +391,7 @@ def test_invalid_choice(): |
64 |
+ p = DebugArghParser() |
65 |
+ p.add_commands([cmd], namespace='nest') |
66 |
+ |
67 |
+- assert run(p, 'nest bar', exit=True).startswith('invalid choice') |
68 |
++ assert 'invalid choice' in run(p, 'nest bar', exit=True) |
69 |
+ |
70 |
+ if sys.version_info < (3,3): |
71 |
+ # Python before 3.3 exits with a less informative error |
72 |
+@@ -511,7 +511,7 @@ def test_explicit_cmd_name(): |
73 |
+ |
74 |
+ p = DebugArghParser() |
75 |
+ p.add_commands([orig_name]) |
76 |
+- assert run(p, 'orig-name', exit=True).startswith('invalid choice') |
77 |
++ assert 'invalid choice' in run(p, 'orig-name', exit=True) |
78 |
+ assert run(p, 'new-name').out == 'ok\n' |
79 |
+ |
80 |
+ |