summaryrefslogtreecommitdiff
path: root/contrib/py-bindings/test.py
diff options
context:
space:
mode:
authorjordi.saludes <jordi.saludes@upc.edu>2010-07-22 14:19:55 +0000
committerjordi.saludes <jordi.saludes@upc.edu>2010-07-22 14:19:55 +0000
commit63a4c97e18a6eda261e451098d2360a9570b89a7 (patch)
tree690f8f220e805c9ca8f0dde51d0be18912d42988 /contrib/py-bindings/test.py
parentaff9f220c9427ebd0d4869cf72ec79f005b4970e (diff)
Checking args passed to gf functions.
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()