diff options
| author | Barry Warsaw <barry@python.org> | 2003-01-28 17:20:44 (GMT) |
|---|---|---|
| committer | Barry Warsaw <barry@python.org> | 2003-01-28 17:20:44 (GMT) |
| commit | f71de3e9a017d698be8ee4db3e2ec5fbc68bfc8c (patch) | |
| tree | b31170225a2c763246014d72e4d5db8b31fc5354 /Lib/bsddb/test/test_compat.py | |
| parent | a6ae9a2128a85301ded9381c181539720ce82ca0 (diff) | |
| download | cpython-f71de3e9a017d698be8ee4db3e2ec5fbc68bfc8c.zip cpython-f71de3e9a017d698be8ee4db3e2ec5fbc68bfc8c.tar.gz cpython-f71de3e9a017d698be8ee4db3e2ec5fbc68bfc8c.tar.bz2 | |
Everything worked in both the distutils distro and in Python 2.3cvs,
so merge from the bsddb-bsddb3-schizo-branch back to the trunk.
Diffstat (limited to 'Lib/bsddb/test/test_compat.py')
| -rw-r--r-- | Lib/bsddb/test/test_compat.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/bsddb/test/test_compat.py b/Lib/bsddb/test/test_compat.py index 862ec74..26b80cf0 100644 --- a/Lib/bsddb/test/test_compat.py +++ b/Lib/bsddb/test/test_compat.py @@ -4,13 +4,18 @@ regression test suite. """ import sys, os, string -from bsddb import hashopen, btopen, rnopen import bsddb import unittest import tempfile from test_all import verbose +try: + # For Python 2.3 + from bsddb import db, hashopen, btopen, rnopen +except ImportError: + # For earlier Pythons w/distutils pybsddb + from bsddb3 import db, hashopen, btopen, rnopen class CompatibilityTestCase(unittest.TestCase): @@ -126,7 +131,7 @@ class CompatibilityTestCase(unittest.TestCase): if verbose: print "truth test: true" else: if verbose: print "truth test: false" - except bsddb.error: + except db.DBError: pass else: self.fail("Exception expected") |
