Skip to content

Commit 9ae5c67

Browse files
committed
MNT: Set expected CLI output based on Python version
1 parent 0501b79 commit 9ae5c67

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

nipype/utils/tests/test_cmd.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,21 @@ def test_main_returns_0_on_help(self):
4545
assert exit_exception.code == 0
4646

4747
assert stderr.getvalue() == ""
48+
if sys.version_info >= (3, 10):
49+
options = "options"
50+
else:
51+
options = "optional arguments"
4852
assert (
4953
stdout.getvalue()
50-
== """usage: nipype_cmd [-h] module interface
54+
== f"""usage: nipype_cmd [-h] module interface
5155
5256
Nipype interface runner
5357
5458
positional arguments:
5559
module Module name
5660
interface Interface name
5761
58-
optional arguments:
62+
{options}:
5963
-h, --help show this help message and exit
6064
"""
6165
)

0 commit comments

Comments
 (0)