summaryrefslogtreecommitdiff
path: root/contrib/py-bindings/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/py-bindings/test.py')
-rw-r--r--contrib/py-bindings/test.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/py-bindings/test.py b/contrib/py-bindings/test.py
index 46164b126..716aba6c3 100644
--- a/contrib/py-bindings/test.py
+++ b/contrib/py-bindings/test.py
@@ -30,13 +30,17 @@ def rmprefix(obj):
# return m and s[m.end(0):]
class TestPgfInfo(unittest.TestCase):
- def pgf(self):
- return gf.read_pgf(self.path)
+ def pgf(self, path=None):
+ path = path or self.path
+ return gf.read_pgf(path)
def setUp(self):
self.path = 'Query.pgf'
def test_readPgf(self):
pgf = self.pgf()
self.assertNotEqual(pgf,None)
+ def test_readNonExistent(self):
+ nopath = 'x' + self.path
+ self.assertRaises(IOError, self.pgf, nopath)
def test_startcat(self):
pgf = self.pgf()
cat = pgf.startcat()