diff options
author | Joel Capitao <jcapitao@redhat.com> | 2021-02-11 09:46:37 +0100 |
---|---|---|
committer | Joel Capitao <jcapitao@redhat.com> | 2021-06-15 14:53:54 +0200 |
commit | 9b66f4066cfb78e3a2e40824b4f9d532f494b9a4 (patch) | |
tree | 66f959f68dc63b5ac704f25116a848403a079c6f | |
parent | 392f3b2e7cb2dad8036ebbaefbb75dd758914421 (diff) | |
download | cliff-9b66f4066cfb78e3a2e40824b4f9d532f494b9a4.tar.gz |
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
-rw-r--r-- | cliff/tests/test_help.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cliff/tests/test_help.py b/cliff/tests/test_help.py index 9034779..4862f25 100644 --- a/cliff/tests/test_help.py +++ b/cliff/tests/test_help.py @@ -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' |