Author: gregory.p.smith
Date: Mon Sep 3 18:48:32 2007
New Revision: 57933
Modified:
python/branches/py3k/Lib/bsddb/test/test_compare.py
Log:
fix test, use bytes not unicode and let the test raise its internal exception
rather than just complaining about stderr not being what we expected masking
the true problem.
Modified: python/branches/py3k/Lib/bsddb/test/test_compare.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_compare.py (original)
+++ python/branches/py3k/Lib/bsddb/test/test_compare.py Mon Sep 3 18:48:32 2007
@@ -179,9 +179,9 @@
finally:
temp = sys.stderr
sys.stderr = stdErr
- errorOut = temp.getvalue()
- if not successRe.search(errorOut):
- self.fail("unexpected stderr output: %r" % errorOut)
+ errorOut = temp.getvalue()
+ if not successRe.search(errorOut):
+ self.fail("unexpected stderr output: %r" % errorOut)
def _test_compare_function_exception (self):
self.startTest ()
@@ -192,7 +192,7 @@
raise RuntimeError("i'm a naughty comparison function")
self.createDB (bad_comparator)
#print "\n*** test should print 2 uncatchable tracebacks ***"
- self.addDataToDB (['a', 'b', 'c']) # this should raise, but...
+ self.addDataToDB ([b'a', b'b', b'c']) # this should raise, but...
self.finishTest ()
def test_compare_function_exception(self):
@@ -210,7 +210,7 @@
return l
self.createDB (bad_comparator)
#print "\n*** test should print 2 errors about returning an int ***"
- self.addDataToDB (['a', 'b', 'c']) # this should raise, but...
+ self.addDataToDB ([b'a', b'b', b'c']) # this should raise, but...
self.finishTest ()
def test_compare_function_bad_return(self):
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins