Mercurial > p > roundup > code
diff test/db_test_base.py @ 6240:0c3def4b5275
Check for DesignatorError rather than ValueError
Verify the more explicit exception.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 28 Jul 2020 06:52:28 -0400 |
| parents | d3878ac549e9 |
| children | b14359503b49 |
line wrap: on
line diff
--- a/test/db_test_base.py Tue Jul 28 06:44:43 2020 -0400 +++ b/test/db_test_base.py Tue Jul 28 06:52:28 2020 -0400 @@ -2983,7 +2983,7 @@ self.db.post_init() def test_splitDesignator(self): - from roundup.hyperdb import splitDesignator + from roundup.hyperdb import splitDesignator, DesignatorError valid_test_cases = [('zip2py44', ('zip2py', '44')), ('zippy2', ('zippy', '2')), @@ -3001,7 +3001,7 @@ for designator in invalid_test_cases: print("Testing %s"%designator) - with self.assertRaises(ValueError) as ctx: + with self.assertRaises(DesignatorError) as ctx: splitDesignator(designator) error = '"%s" not a node designator' % designator self.assertEqual(str(ctx.exception), error)
