aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2020-12-20 22:09:55 -0500
committerMatt Turner <mattst88@gentoo.org>2020-12-20 22:24:54 -0500
commitbb443542626c0ecb769c8ab0efc3bae9da8154c3 (patch)
tree24c3391dd4e83a4c9efe8bb8887c3b4758a1f3cb
parentekeyword: Rename unit test so that it runs (diff)
downloadgentoolkit-bb443542.tar.gz
gentoolkit-bb443542.tar.bz2
gentoolkit-bb443542.zip
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@gentoo.org>
-rwxr-xr-xpym/gentoolkit/ekeyword/test_ekeyword.py38
1 files 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"""