1 |
commit: bb443542626c0ecb769c8ab0efc3bae9da8154c3 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 21 03:09:55 2020 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 21 03:24:54 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=bb443542 |
7 |
|
8 |
ekeyword: Fix unit test |
9 |
|
10 |
arch_status changed from a Dict[str] to Dict[Tuple[str, str]], but these |
11 |
bits of test data were not updated. Update the examples while we're here |
12 |
(e.g. arm64 is stable with stable profiles now). |
13 |
|
14 |
Fixes: 459cfba47d25 (ekeyword: Use now-common load_profile_data() from eshowkw) |
15 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
16 |
|
17 |
pym/gentoolkit/ekeyword/test_ekeyword.py | 38 +++++++++++++++----------------- |
18 |
1 file changed, 18 insertions(+), 20 deletions(-) |
19 |
|
20 |
diff --git a/pym/gentoolkit/ekeyword/test_ekeyword.py b/pym/gentoolkit/ekeyword/test_ekeyword.py |
21 |
index 3d23585..12a0b54 100755 |
22 |
--- a/pym/gentoolkit/ekeyword/test_ekeyword.py |
23 |
+++ b/pym/gentoolkit/ekeyword/test_ekeyword.py |
24 |
@@ -165,28 +165,26 @@ class TestProcessKeywords(unittest.TestCase): |
25 |
ekeyword.Op(None, 'all', None), |
26 |
) |
27 |
arch_status = { |
28 |
- 'alpha': None, |
29 |
- 'arm': 'stable', |
30 |
- 'arm64': 'exp', |
31 |
- 'm68k': 'dev', |
32 |
+ 'alpha': ('stable', '~arch'), |
33 |
+ 'arm': ('stable', 'arch'), |
34 |
+ 'm68k': ('exp', '~arch'), |
35 |
+ 's390': ('exp', 'arch'), |
36 |
} |
37 |
- self._test('* ~alpha ~arm ~arm64 ~m68k ~mips ~arm-linux', ops, |
38 |
- '* ~alpha arm ~arm64 ~m68k ~mips ~arm-linux', arch_status) |
39 |
+ self._test('* ~alpha ~arm ~m68k ~mips ~s390 ~arm-linux', ops, |
40 |
+ '* ~alpha arm ~m68k ~mips s390 ~arm-linux', arch_status) |
41 |
|
42 |
def testAllUnstable(self): |
43 |
ops = ( |
44 |
ekeyword.Op('~', 'all', None), |
45 |
) |
46 |
arch_status = { |
47 |
- 'alpha': None, |
48 |
- 'arm': 'stable', |
49 |
- 'arm64': 'exp', |
50 |
- 'm68k': 'dev', |
51 |
- 's390': 'dev', |
52 |
- 'sh': 'dev', |
53 |
+ 'alpha': ('stable', '~arch'), |
54 |
+ 'arm': ('stable', 'arch'), |
55 |
+ 'm68k': ('exp', '~arch'), |
56 |
+ 's390': ('exp', 'arch'), |
57 |
} |
58 |
- self._test('-* ~* * alpha arm arm64 m68k arm-linux', ops, |
59 |
- '-* ~* * ~alpha ~arm ~arm64 ~m68k ~arm-linux', arch_status) |
60 |
+ self._test('-* ~* * alpha arm m68k s390 arm-linux', ops, |
61 |
+ '-* ~* * ~alpha ~arm ~m68k ~s390 ~arm-linux', arch_status) |
62 |
|
63 |
def testAllMultiUnstableStable(self): |
64 |
ops = ( |
65 |
@@ -194,13 +192,13 @@ class TestProcessKeywords(unittest.TestCase): |
66 |
ekeyword.Op(None, 'all', None), |
67 |
) |
68 |
arch_status = { |
69 |
- 'alpha': None, |
70 |
- 'arm': 'stable', |
71 |
- 'arm64': 'exp', |
72 |
- 'm68k': 'dev', |
73 |
+ 'alpha': ('stable', '~arch'), |
74 |
+ 'arm': ('stable', 'arch'), |
75 |
+ 'm68k': ('exp', '~arch'), |
76 |
+ 's390': ('exp', 'arch'), |
77 |
} |
78 |
- self._test('-* ~* * alpha arm arm64 m68k', ops, |
79 |
- '-* ~* * ~alpha arm ~arm64 ~m68k', arch_status) |
80 |
+ self._test('-* ~* * alpha arm m68k s390', ops, |
81 |
+ '-* ~* * ~alpha arm ~m68k s390', arch_status) |
82 |
|
83 |
def testAllDisabled(self): |
84 |
"""Make sure ~all does not change -arch to ~arch""" |