Skip to content
Snippets Groups Projects
Commit 9b66f406 authored by Joel Capitao's avatar Joel Capitao
Browse files

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] https://github.com/python/cpython/commit/fb35fa49d192368e94ffec09c092260ed0fea2e1

Change-Id: I18d9f1bea7bb5a7afb273550314c36da7b466a69
parent 392f3b2e
No related branches found
No related tags found
No related merge requests found
......@@ -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'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment