summaryrefslogtreecommitdiff
path: root/lib/tdb/python/tests/simple.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tdb/python/tests/simple.py')
-rw-r--r--lib/tdb/python/tests/simple.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/tdb/python/tests/simple.py b/lib/tdb/python/tests/simple.py
index 1c5982b1a4..6b1e840f32 100644
--- a/lib/tdb/python/tests/simple.py
+++ b/lib/tdb/python/tests/simple.py
@@ -12,12 +12,15 @@ import os, tempfile
class OpenTdbTests(TestCase):
+
def test_nonexistant_read(self):
- self.assertRaises(IOError, tdb.Tdb, "/some/nonexistant/file", 0, tdb.DEFAULT, os.O_RDWR)
+ self.assertRaises(IOError, tdb.Tdb, "/some/nonexistant/file", 0,
+ 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)
+ self.tdb = tdb.Tdb(tempfile.mkstemp()[1], 0, tdb.DEFAULT,
+ os.O_CREAT|os.O_RDWR)
self.assertNotEqual(None, self.tdb)
# ensure that double close does not crash python
@@ -26,9 +29,11 @@ class CloseTdbTests(TestCase):
class SimpleTdbTests(TestCase):
+
def setUp(self):
super(SimpleTdbTests, self).setUp()
- self.tdb = tdb.Tdb(tempfile.mkstemp()[1], 0, tdb.DEFAULT, os.O_CREAT|os.O_RDWR)
+ self.tdb = tdb.Tdb(tempfile.mkstemp()[1], 0, tdb.DEFAULT,
+ os.O_CREAT|os.O_RDWR)
self.assertNotEqual(None, self.tdb)
def tearDown(self):