From 26c8437e884f310ea80ed31209d3c926ced400e5 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 7 Jun 2012 14:05:42 +1200 Subject: Better test daemon cleanup, improve utils test coverage. --- test/test_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/test_utils.py') diff --git a/test/test_utils.py b/test/test_utils.py index f8c7edb7..eb658e96 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -5,10 +5,17 @@ from libpathod import utils class uparse_anchor_spec(libpry.AutoTree): def test_simple(self): assert utils.parse_anchor_spec("foo=200", {}) == ("foo", "200") + libpry.raises(utils.AnchorError, utils.parse_anchor_spec, "foobar", {}) libpry.raises(utils.AnchorError, utils.parse_anchor_spec, "*=200", {}) libpry.raises(utils.AnchorError, utils.parse_anchor_spec, "foo=bar", {}) +class udata_path(libpry.AutoTree): + def test_simple(self): + libpry.raises(ValueError, utils.data.path, "nonexistent") + + tests = [ + udata_path(), uparse_anchor_spec() ] -- cgit v1.2.3