diff options
author | Don Anderson <dda@ddanderson.com> | 2012-03-15 12:14:24 -0400 |
---|---|---|
committer | Don Anderson <dda@ddanderson.com> | 2012-03-15 12:14:24 -0400 |
commit | 4421e9ecaa23de1c83074c73c645aeb47841ce3b (patch) | |
tree | ace3665249ace8ec2bc7475ee245e9f93c571921 /test/suite/test_cursor04.py | |
parent | b1f069fc7e4c7b5f6d423bc714434be5718673ff (diff) | |
download | mongo-4421e9ecaa23de1c83074c73c645aeb47841ce3b.tar.gz |
Capture the stderr and stdout of the native code in files, while keeping
python stderr/stdout continue normally. Achieved by dup-ing/reoopening
fd's, and recreating python's sys.stdout/sys.stderr.
Every test now has err/out captured, and it is checked to assure it is
empty at the end of every test. Any python code that expects to have
output or error must be wrapped, e.g.:
with self.expectedStderr('some message'):
wiredtiger.codeThatGeneratesErrorMessage()
Patterns can also be checked with self.expectedStderrPattern('hello.*ld')
As a convenience, added assertRaisesWithMessage() that works like
unittest.assertRaises(), but takes an added message that must match,
or a pattern, using "/.*/"
Diffstat (limited to 'test/suite/test_cursor04.py')
0 files changed, 0 insertions, 0 deletions