fix issue96 - make capturing more resilient against KeyboardInterrupt

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-05-17 19:00:39 +02:00
parent 5876736890
commit e71685736e
5 changed files with 191 additions and 135 deletions

View File

@@ -39,6 +39,10 @@ class TestCaptureManager:
old = sys.stdout, sys.stderr, sys.stdin
try:
capman = CaptureManager()
# call suspend without resume or start
outerr = capman.suspendcapture()
outerr = capman.suspendcapture()
assert outerr == ("", "")
capman.resumecapture(method)
print ("hello")
out, err = capman.suspendcapture()