2023-12-02 16:18:58 +00:00
|
|
|
Index: dictknife-0.14.0/dictknife/tests/cliutils/test_extraarguments.py
|
2022-02-03 01:39:35 +00:00
|
|
|
===================================================================
|
2023-12-02 16:18:58 +00:00
|
|
|
--- dictknife-0.14.0.orig/dictknife/tests/cliutils/test_extraarguments.py
|
|
|
|
|
+++ dictknife-0.14.0/dictknife/tests/cliutils/test_extraarguments.py
|
2022-02-03 01:39:35 +00:00
|
|
|
@@ -1,3 +1,4 @@
|
|
|
|
|
+import sys
|
|
|
|
|
import textwrap
|
|
|
|
|
import unittest
|
|
|
|
|
|
|
|
|
|
@@ -22,18 +23,21 @@ class Tests(unittest.TestCase):
|
|
|
|
|
return target
|
|
|
|
|
|
|
|
|
|
def test_help_message(self):
|
|
|
|
|
+ ending = "al arguments"
|
|
|
|
|
+ if sys.version_info >= (3, 10):
|
2023-12-02 16:18:58 +00:00
|
|
|
+ ending = "s"
|
2022-02-03 01:39:35 +00:00
|
|
|
target = self._makeOne()
|
|
|
|
|
expected = textwrap.dedent(
|
|
|
|
|
"""
|
|
|
|
|
usage: cmd [-h]
|
|
|
|
|
|
2023-12-02 16:18:58 +00:00
|
|
|
- options:
|
2022-02-03 01:39:35 +00:00
|
|
|
+ option%s:
|
|
|
|
|
-h, --help show this help message and exit
|
|
|
|
|
|
|
|
|
|
extra arguments: (with --extra<option>)
|
|
|
|
|
for --format=json:
|
|
|
|
|
--sort-keys sort keys
|
|
|
|
|
- """
|
2023-12-02 16:18:58 +00:00
|
|
|
+ """ % (ending, )
|
2022-02-03 01:39:35 +00:00
|
|
|
).strip()
|
|
|
|
|
|
|
|
|
|
actual = target.parser.format_help().strip()
|