comparison cmd2.py @ 379:1babd3df22d1

hg troubles with py3 branch
author cat@eee
date Mon, 22 Feb 2010 19:24:50 -0500
parents 0b77ca917fd2
children de2306847251
comparison
equal deleted inserted replaced
378:0b77ca917fd2 379:1babd3df22d1
1444 return result 1444 return result
1445 def tearDown(self): 1445 def tearDown(self):
1446 sys.stdout = self.old_stdout 1446 sys.stdout = self.old_stdout
1447 1447
1448 class OutputTrap(Borg): 1448 class OutputTrap(Borg):
1449 '''Instantiate an OutputTrap to divert/capture ALL stdout output. For use in unit testing. 1449 '''Instantiate an OutputTrap to divert/capture ALL stdout output. For use in unit testing.
1450 Call `tearDown()` to return to normal output.''' 1450 Call `tearDown()` to return to normal output.'''
1451 def __init__(self): 1451 def __init__(self):
1452 self.contents = '' 1452 self.contents = ''
1453 self.old_stdout = sys.stdout 1453 self.old_stdout = sys.stdout
1454 sys.stdout = self 1454 sys.stdout = self