[Python-checkins] python/dist/src/Lib/bsddb/test test_compare.py, 1.4, 1.5
greg@users.sourceforge.net
greg at users.sourceforge.net
Thu Jun 9 09:11:46 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib/bsddb/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28172
Modified Files:
test_compare.py
Log Message:
fix import to work with either module name.
Index: test_compare.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_compare.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- test_compare.py 8 Jun 2005 04:35:50 -0000 1.4
+++ test_compare.py 9 Jun 2005 07:11:43 -0000 1.5
@@ -7,7 +7,12 @@
from cStringIO import StringIO
import unittest
-from bsddb3 import db
+try:
+ # For Pythons w/distutils pybsddb
+ from bsddb3 import db, dbshelve
+except ImportError:
+ # For Python 2.3
+ from bsddb import db, dbshelve
lexical_cmp = cmp
More information about the Python-checkins
mailing list