summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-24 11:02:32 -0600
committerStefan Metzmacher <metze@samba.org>2007-12-26 11:57:03 -0600
commit9faf93c7b0e00edcdc3f535ea69fc2c1bb6eeeb3 (patch)
tree53b0990a32cfb77d988318e9704b8e34833e116a /source4/lib/tdb/python
parent5e574b2b940bf4d7e040409c6a7ceba14eece798 (diff)
downloadsamba-9faf93c7b0e00edcdc3f535ea69fc2c1bb6eeeb3.tar.gz
samba-9faf93c7b0e00edcdc3f535ea69fc2c1bb6eeeb3.tar.bz2
samba-9faf93c7b0e00edcdc3f535ea69fc2c1bb6eeeb3.zip
r26583: Throw a proper exception in the python code when tdb_open() fails, fix indentation in generated SWIG code from pidl.
(This used to be commit 4ff8f4e370d30bf6b0b2f548bca14a9b7e1317f6)
Diffstat (limited to 'source4/lib/tdb/python')
-rw-r--r--source4/lib/tdb/python/tests/simple.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/tdb/python/tests/simple.py b/source4/lib/tdb/python/tests/simple.py
index 4600f02f14..0e0ef0251e 100644
--- a/source4/lib/tdb/python/tests/simple.py
+++ b/source4/lib/tdb/python/tests/simple.py
@@ -10,6 +10,12 @@ import tdb
from unittest import TestCase
import os
+
+class OpenTdbTests(TestCase):
+ def test_nonexistant_read(self):
+ self.assertRaises(IOError, tdb.Tdb, "/some/nonexistant/file", 0, tdb.DEFAULT, os.O_RDWR)
+
+
class SimpleTdbTests(TestCase):
def setUp(self):
super(SimpleTdbTests, self).setUp()