From: Matt Turner <mattst88@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: Matt Turner <mattst88@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH gentoolkit 2/3] ekeyword: Fix unit test
Date: Sun, 20 Dec 2020 22:25:25 -0500 [thread overview]
Message-ID: <20201221032526.306727-2-mattst88@gentoo.org> (raw)
In-Reply-To: <20201221032526.306727-1-mattst88@gentoo.org>
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>
---
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"""
--
2.26.2
next prev parent reply other threads:[~2020-12-21 3:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-21 3:25 [gentoo-portage-dev] [PATCH gentoolkit 1/3] ekeyword: Rename unit test so that it runs Matt Turner
2020-12-21 3:25 ` Matt Turner [this message]
2020-12-21 3:25 ` [gentoo-portage-dev] [PATCH gentoolkit 3/3] eclean: Remove unneeded __init__ to enable pytest Matt Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201221032526.306727-2-mattst88@gentoo.org \
--to=mattst88@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox