Commit 9e0a88c5 authored by Luke Macken's avatar Luke Macken

The cli injection test doesn't sys.exit

parent 9e373b8f
...@@ -78,11 +78,7 @@ class TestCLI(object): ...@@ -78,11 +78,7 @@ class TestCLI(object):
sys.argv = ['pyrasite', str(os.getpid()), 'helloworld.py'] sys.argv = ['pyrasite', str(os.getpid()), 'helloworld.py']
stdout = sys.stdout stdout = sys.stdout
sys.stdout = StringIO() sys.stdout = StringIO()
try:
main() main()
except SystemExit:
exit_code = sys.exc_info()[1].code
assert exit_code == 4, exit_code
value = sys.stdout.getvalue() value = sys.stdout.getvalue()
sys.stdout = stdout sys.stdout = stdout
assert "Hello World!" in value, repr(value) assert "Hello World!" in value, repr(value)
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