commit:     bb443542626c0ecb769c8ab0efc3bae9da8154c3
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 21 03:09:55 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Dec 21 03:24:54 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=bb443542

ekeyword: Fix unit test

arch_status changed from a Dict[str] to Dict[Tuple[str, str]], but these
bits of test data were not updated. Update the examples while we're here
(e.g. arm64 is stable with stable profiles now).

Fixes: 459cfba47d25 (ekeyword: Use now-common load_profile_data() from eshowkw)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 pym/gentoolkit/ekeyword/test_ekeyword.py | 38 +++++++++++++++-----------------
 1 file changed, 18 insertions(+), 20 deletions(-)

diff --git a/pym/gentoolkit/ekeyword/test_ekeyword.py 
b/pym/gentoolkit/ekeyword/test_ekeyword.py
index 3d23585..12a0b54 100755
--- a/pym/gentoolkit/ekeyword/test_ekeyword.py
+++ b/pym/gentoolkit/ekeyword/test_ekeyword.py
@@ -165,28 +165,26 @@ class TestProcessKeywords(unittest.TestCase):
                        ekeyword.Op(None, 'all', None),
                )
                arch_status = {
-                       'alpha': None,
-                       'arm': 'stable',
-                       'arm64': 'exp',
-                       'm68k': 'dev',
+                       'alpha': ('stable', '~arch'),
+                       'arm':   ('stable', 'arch'),
+                       'm68k':  ('exp', '~arch'),
+                       's390':  ('exp', 'arch'),
                }
-               self._test('* ~alpha ~arm ~arm64 ~m68k ~mips ~arm-linux', ops,
-                          '* ~alpha arm ~arm64 ~m68k ~mips ~arm-linux', 
arch_status)
+               self._test('* ~alpha ~arm ~m68k ~mips ~s390 ~arm-linux', ops,
+                          '* ~alpha arm ~m68k ~mips s390 ~arm-linux', 
arch_status)
 
        def testAllUnstable(self):
                ops = (
                        ekeyword.Op('~', 'all', None),
                )
                arch_status = {
-                       'alpha': None,
-                       'arm': 'stable',
-                       'arm64': 'exp',
-                       'm68k': 'dev',
-                       's390': 'dev',
-                       'sh': 'dev',
+                       'alpha': ('stable', '~arch'),
+                       'arm':   ('stable', 'arch'),
+                       'm68k':  ('exp', '~arch'),
+                       's390':  ('exp', 'arch'),
                }
-               self._test('-* ~* * alpha arm arm64 m68k arm-linux', ops,
-                          '-* ~* * ~alpha ~arm ~arm64 ~m68k ~arm-linux', 
arch_status)
+               self._test('-* ~* * alpha arm m68k s390 arm-linux', ops,
+                          '-* ~* * ~alpha ~arm ~m68k ~s390 ~arm-linux', 
arch_status)
 
        def testAllMultiUnstableStable(self):
                ops = (
@@ -194,13 +192,13 @@ class TestProcessKeywords(unittest.TestCase):
                        ekeyword.Op(None, 'all', None),
                )
                arch_status = {
-                       'alpha': None,
-                       'arm': 'stable',
-                       'arm64': 'exp',
-                       'm68k': 'dev',
+                       'alpha': ('stable', '~arch'),
+                       'arm':   ('stable', 'arch'),
+                       'm68k':  ('exp', '~arch'),
+                       's390':  ('exp', 'arch'),
                }
-               self._test('-* ~* * alpha arm arm64 m68k', ops,
-                          '-* ~* * ~alpha arm ~arm64 ~m68k', arch_status)
+               self._test('-* ~* * alpha arm m68k s390', ops,
+                          '-* ~* * ~alpha arm ~m68k s390', arch_status)
 
        def testAllDisabled(self):
                """Make sure ~all does not change -arch to ~arch"""

Reply via email to