There was an error while loading. Please reload this page.
1 parent 2bb4036 commit 2bf26d1Copy full SHA for 2bf26d1
1 file changed
tests/test_main.py
@@ -18,6 +18,7 @@
18
from fixtures import exefile
19
20
import floss.main
21
+from floss.version import __version__
22
23
24
def test_main_help(capsys):
@@ -38,11 +39,13 @@ def test_main_help(capsys):
38
39
assert "--json" in out
40
41
-def test_main_version():
42
+def test_main_version(capsys):
43
with pytest.raises(SystemExit) as pytest_wrapped_e:
44
floss.main.main(["--version"])
45
assert pytest_wrapped_e.type == SystemExit
46
assert pytest_wrapped_e.value.code == 0
47
+ out = capsys.readouterr().out
48
+ assert __version__ in out
49
50
51
def test_main(exefile):
0 commit comments