Skip to content

Commit e668fd5

Browse files
committed
Some assertions were not being run. Move them so that they are run
1 parent 2e9db49 commit e668fd5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/test_find_extra_reqs.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pytest
88
import pretend
99

10-
from pip_check_reqs import find_extra_reqs, common
10+
from pip_check_reqs import find_extra_reqs, common, __version__
1111

1212

1313
@pytest.fixture
@@ -90,7 +90,8 @@ def test_main_failure(monkeypatch, caplog, fake_opts):
9090

9191
with pytest.raises(SystemExit) as excinfo:
9292
find_extra_reqs.main()
93-
assert excinfo.value == 1
93+
94+
assert excinfo.value.code == 1
9495

9596
assert caplog.records[0].message == \
9697
'Extra requirements:'
@@ -108,7 +109,8 @@ def test_main_no_spec(monkeypatch, caplog, fake_opts):
108109

109110
with pytest.raises(SystemExit) as excinfo:
110111
find_extra_reqs.main()
111-
assert excinfo.value == 2
112+
113+
assert excinfo.value.code == 2
112114

113115
assert fake_opts.error.calls
114116

@@ -164,4 +166,5 @@ def test_main_version(monkeypatch, caplog, fake_opts):
164166

165167
with pytest.raises(SystemExit) as excinfo:
166168
find_extra_reqs.main()
167-
assert excinfo.value == 'version'
169+
170+
assert str(excinfo.value) == __version__

0 commit comments

Comments
 (0)