summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-02-19 01:21:11 (GMT)
committerGeorg Brandl <georg@python.org>2006-02-19 01:21:11 (GMT)
commit19e2203fffcb0ae98bebe3c21a6233cad6a1453c (patch)
tree216acd50144cc42acd40239706e32ef713c440b5 /Lib/bsddb/test
parent26caeba35a34afb1ff5ce5104d8598b395b87716 (diff)
downloadcpython-19e2203fffcb0ae98bebe3c21a6233cad6a1453c.zip
cpython-19e2203fffcb0ae98bebe3c21a6233cad6a1453c.tar.gz
cpython-19e2203fffcb0ae98bebe3c21a6233cad6a1453c.tar.bz2
Add a unit test for bug fix #1396678.
Diffstat (limited to 'Lib/bsddb/test')
-rw-r--r--Lib/bsddb/test/test_misc.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/bsddb/test/test_misc.py b/Lib/bsddb/test/test_misc.py
index a66b1de..88f700b 100644
--- a/Lib/bsddb/test/test_misc.py
+++ b/Lib/bsddb/test/test_misc.py
@@ -7,10 +7,10 @@ import unittest
try:
# For Pythons w/distutils pybsddb
- from bsddb3 import db, dbshelve
+ from bsddb3 import db, dbshelve, hashopen
except ImportError:
# For Python 2.3
- from bsddb import db, dbshelve
+ from bsddb import db, dbshelve, hashopen
#----------------------------------------------------------------------
@@ -46,6 +46,12 @@ class MiscTestCase(unittest.TestCase):
env.open(self.homeDir, db.DB_CREATE)
assert self.homeDir == env.db_home
+ def test03_repr_closed_db(self):
+ db = hashopen(self.filename)
+ db.close()
+ rp = repr(db)
+ self.assertEquals(rp, "{}")
+
#----------------------------------------------------------------------