Skip to content

Commit 6f1ee8c

Browse files
committed
Added test of version flag
1 parent 26cada9 commit 6f1ee8c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/test_comment_spell_check.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,24 @@ def test_comment_spell_check(self):
5454
self.fail(
5555
"Self code test: comment_spell_check.py process returned bad code"
5656
)
57+
58+
print("\nTest version")
59+
runresult = subprocess.run(
60+
[
61+
"python",
62+
"comment_spell_check.py",
63+
"--version",
64+
],
65+
stdout = subprocess.PIPE,
66+
)
67+
print("Return code:", runresult.returncode)
68+
print("Version: ", runresult.stdout)
69+
version_string = str(runresult.stdout)
70+
if runresult.returncode:
71+
self.fail(
72+
"Self code test: comment_spell_check.py process returned bad code"
73+
)
74+
if "unknown" in version_string:
75+
self.fail(
76+
"Self code test: version string contains \'unknown\'"
77+
)

0 commit comments

Comments
 (0)