diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2006-01-29 23:54:38 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2006-01-29 23:54:38 (GMT) |
commit | c26cf5a6f16c7a2e10ed13dcb4daa083981e4d85 (patch) | |
tree | 57bbbf859f7757a305ee3b5f91de93e8cbabc226 /Lib | |
parent | 249c7b050b60274e672d5c05987c0d52f6af0c13 (diff) | |
download | cpython-c26cf5a6f16c7a2e10ed13dcb4daa083981e4d85.zip cpython-c26cf5a6f16c7a2e10ed13dcb4daa083981e4d85.tar.gz cpython-c26cf5a6f16c7a2e10ed13dcb4daa083981e4d85.tar.bz2 |
fix test import for use in standalone pybsddb project bsddb3 module as well
as python builtin bsddb.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/bsddb/test/test_1413192.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/bsddb/test/test_1413192.py b/Lib/bsddb/test/test_1413192.py index 45afb36..3c13536 100644 --- a/Lib/bsddb/test/test_1413192.py +++ b/Lib/bsddb/test/test_1413192.py @@ -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 = '.' |