Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Commit

Permalink
simplified test_cli.test_nonzero_return_code
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed Sep 24, 2016
1 parent c52d8d5 commit 21e7518
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions caniusepython3/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,10 @@ def test_verbose_output(self):

@mock.patch('caniusepython3.dependencies.blockers', lambda projects: ['blocker'])
def test_nonzero_return_code(self):
with tempfile.NamedTemporaryFile('w') as file:
file.write(EXAMPLE_REQUIREMENTS)
file.flush()
args = ['--requirements', file.name]
with self.assertRaises(SystemExit) as context:
ciu_main.main(args=args)
self.assertNotEqual(context.exception.code, 0)
args = ['--projects', 'foo', 'bar.baz']
with self.assertRaises(SystemExit) as context:
ciu_main.main(args=args)
self.assertNotEqual(context.exception.code, 0)


#@unittest.skip('faster testing')
Expand Down

0 comments on commit 21e7518

Please sign in to comment.