Commit 377a3cd4 authored by ∞'s avatar 💻

Catch SystemExit

parent 9d9ed99e
......@@ -38,7 +38,10 @@ def autotest(path, cmd, ignore=None):
@unittest.mock.patch('sys.stderr', new_callable=io.StringIO)
@unittest.mock.patch('sys.stdout', new_callable=io.StringIO)
def test(mock_stdout, mock_stderr):
except SystemExit as e:
console_script.exit_code = e.code
return mock_stdout, mock_stderr
out, err = test()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment