Skip to content

Commit

Permalink
Added test of version flag
Browse files Browse the repository at this point in the history
  • Loading branch information
dave3d committed Oct 11, 2023
1 parent 26cada9 commit 6f1ee8c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/test_comment_spell_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,24 @@ def test_comment_spell_check(self):
self.fail(
"Self code test: comment_spell_check.py process returned bad code"
)

print("\nTest version")
runresult = subprocess.run(
[
"python",
"comment_spell_check.py",
"--version",
],
stdout = subprocess.PIPE,
)
print("Return code:", runresult.returncode)
print("Version: ", runresult.stdout)
version_string = str(runresult.stdout)
if runresult.returncode:
self.fail(
"Self code test: comment_spell_check.py process returned bad code"
)
if "unknown" in version_string:
self.fail(
"Self code test: version string contains \'unknown\'"
)

0 comments on commit 6f1ee8c

Please sign in to comment.