From 9faf93c7b0e00edcdc3f535ea69fc2c1bb6eeeb3 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 24 Dec 2007 11:02:32 -0600 Subject: 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) --- source4/lib/tdb/python/tests/simple.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/lib/tdb/python') 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() -- cgit