summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-07-21 18:43:33 (GMT)
committerBarry Warsaw <barry@python.org>2003-07-21 18:43:33 (GMT)
commite676c5ef3ed8a34431f1c30cf91ef67ab70c6d4e (patch)
tree0d1f12ae5473c6b65e016a2b4889bc086f2fa19f /Lib
parentf239c6d5378d2ada6ec7be1e76ce8564796577cc (diff)
downloadcpython-e676c5ef3ed8a34431f1c30cf91ef67ab70c6d4e.zip
cpython-e676c5ef3ed8a34431f1c30cf91ef67ab70c6d4e.tar.gz
cpython-e676c5ef3ed8a34431f1c30cf91ef67ab70c6d4e.tar.bz2
test01_join(): Fix a test failure when run with "python -O". The
setting of sCursor happened in an assert.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/bsddb/test/test_join.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/bsddb/test/test_join.py b/Lib/bsddb/test/test_join.py
index f434c54..838ffe7 100644
--- a/Lib/bsddb/test/test_join.py
+++ b/Lib/bsddb/test/test_join.py
@@ -85,7 +85,10 @@ class JoinTestCase(unittest.TestCase):
try:
# lets look up all of the red Products
sCursor = secDB.cursor()
- assert sCursor.set('red')
+ # Don't do the .set() in an assert, or you can get a bogus failure
+ # when running python -O
+ tmp = sCursor.set('red')
+ assert tmp
# FIXME: jCursor doesn't properly hold a reference to its
# cursors, if they are closed before jcursor is used it