From 5e67566f5e660a91c004aa606d1987fd7665f5dd Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 19 Jun 2010 17:46:57 +0200 Subject: pytdb: Cleanup formatting. --- lib/tdb/python/tests/simple.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib') 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): -- cgit