mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 09:53:32 +01:00
initial checkin
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
commit
5755d14d84
13 changed files with 124 additions and 0 deletions
5
test/mute-stdio/Makefile
Normal file
5
test/mute-stdio/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
TOPDIR = ../..
|
||||
|
||||
include $(TOPDIR)/make/proj.mk
|
||||
include $(MODDIR)/make/py-run.mk
|
||||
|
||||
14
test/mute-stdio/main.py
Normal file
14
test/mute-stdio/main.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import jwutil
|
||||
|
||||
print "This is without muted output"
|
||||
|
||||
with jwutil.MuteStdIO():
|
||||
print "This is with muted output"
|
||||
|
||||
with jwutil.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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue