diff options
Diffstat (limited to 'lib/tdb/python')
-rw-r--r-- | lib/tdb/python/tests/simple.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/tdb/python/tests/simple.py b/lib/tdb/python/tests/simple.py index 7088235536..18180e16bd 100644 --- a/lib/tdb/python/tests/simple.py +++ b/lib/tdb/python/tests/simple.py @@ -18,6 +18,7 @@ class OpenTdbTests(TestCase): tdb.DEFAULT, os.O_RDWR) class CloseTdbTests(TestCase): + def test_double_close(self): self.tdb = tdb.Tdb(tempfile.mkstemp()[1], 0, tdb.DEFAULT, os.O_CREAT|os.O_RDWR) @@ -29,11 +30,12 @@ class CloseTdbTests(TestCase): class InternalTdbTests(TestCase): + def test_repr(self): - self.tdb = tdb.Tdb("whatever", tdb_flags=tdb.INTERNAL) + self.tdb = tdb.Tdb() # repr used to crash on internal db - self.assertEquals(repr(self.tdb), "Tdb('<internal>')") + self.assertEquals(repr(self.tdb), "Tdb(<internal>)") class SimpleTdbTests(TestCase): @@ -127,12 +129,6 @@ class SimpleTdbTests(TestCase): self.tdb.transaction_commit() self.assertEquals("1", self.tdb["bloe"]) - def test_iterator(self): - self.tdb["bloe"] = "2" - self.tdb["bla"] = "hoi" - i = iter(self.tdb) - self.assertEquals(set(["bloe", "bla"]), set([i.next(), i.next()])) - def test_iterkeys(self): self.tdb["bloe"] = "2" self.tdb["bla"] = "25" |