[Python-checkins] r42204 - python/trunk/Lib/bsddb/test/test_1413192.py

gregory.p.smith python-checkins at python.org
Mon Jan 30 00:54:40 CET 2006


Author: gregory.p.smith
Date: Mon Jan 30 00:54:38 2006
New Revision: 42204

Modified:
   python/trunk/Lib/bsddb/test/test_1413192.py
Log:
fix test import for use in standalone pybsddb project bsddb3 module as well
as python builtin bsddb.


Modified: python/trunk/Lib/bsddb/test/test_1413192.py
==============================================================================
--- python/trunk/Lib/bsddb/test/test_1413192.py	(original)
+++ python/trunk/Lib/bsddb/test/test_1413192.py	Mon Jan 30 00:54:38 2006
@@ -4,7 +4,12 @@
 # This test relies on the variable names, see the bug report for details.
 # The problem was that the env was deallocated prior to the txn.
 
-from bsddb import db
+try:
+    # For Pythons w/distutils and add-on pybsddb
+    from bsddb3 import db
+except ImportError:
+    # For Python >= 2.3 builtin bsddb distribution
+    from bsddb import db
 
 env_name = '.'
 


More information about the Python-checkins mailing list