Update unit test to satisfy python3.10+
Fedora is already testing Python 3.10 [1] and an issue
has been raised [2].
All the details are in the BZ ticket but TLDR is that
"optional arguments" was replaced with "options [3].
So, I used assertRegexp to accept both of them (i.e
"optional arguments" and "options").
[1] https://fedoraproject.org/wiki/Changes/Python3.10
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1914138
[3] fb35fa49d1
Change-Id: I18d9f1bea7bb5a7afb273550314c36da7b466a69
This commit is contained in:
parent
392f3b2e7c
commit
9b66f4066c
|
@ -101,7 +101,7 @@ class TestHelp(base.TestBase):
|
|||
help_text = stdout.getvalue()
|
||||
basecommand = os.path.split(sys.argv[0])[1]
|
||||
self.assertIn('usage: %s [--version]' % basecommand, help_text)
|
||||
self.assertIn('optional arguments:\n --version', help_text)
|
||||
self.assertRegex(help_text, 'option(s|al arguments):\n --version')
|
||||
expected = (
|
||||
' one Test command.\n'
|
||||
' three word command Test command.\n'
|
||||
|
|
Loading…
Reference in New Issue