summaryrefslogtreecommitdiff
path: root/test/suite/test_cursor04.py
diff options
context:
space:
mode:
authorDon Anderson <dda@ddanderson.com>2012-03-15 12:14:24 -0400
committerDon Anderson <dda@ddanderson.com>2012-03-15 12:14:24 -0400
commit4421e9ecaa23de1c83074c73c645aeb47841ce3b (patch)
treeace3665249ace8ec2bc7475ee245e9f93c571921 /test/suite/test_cursor04.py
parentb1f069fc7e4c7b5f6d423bc714434be5718673ff (diff)
downloadmongo-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