jw-python/test/mute-stdio/main.py
Jan Lindemann 4c076691a6 Rename module jwutil to jwutils
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-07-24 13:00:37 +02:00

14 lines
347 B
Python

import jwutils
print "This is without muted output"
with jwutils.MuteStdIO():
print "This is with muted output"
with jwutils.MuteStdIO():
print "This will have an error"
print "Second suppressed line of output"
print "Third suppressed line of output"
raise Exception("Something went wrong")
print "Output is unmuted again"