2012-04-28 00:42:03 +00:00
|
|
|
import libpry
|
|
|
|
from libpathod import utils
|
|
|
|
|
|
|
|
|
2012-04-29 00:05:38 +00:00
|
|
|
class uparse_anchor_spec(libpry.AutoTree):
|
|
|
|
def test_simple(self):
|
|
|
|
assert utils.parse_anchor_spec("foo=200", {}) == ("foo", "200")
|
2012-06-07 02:05:42 +00:00
|
|
|
libpry.raises(utils.AnchorError, utils.parse_anchor_spec, "foobar", {})
|
2012-04-29 00:05:38 +00:00
|
|
|
libpry.raises(utils.AnchorError, utils.parse_anchor_spec, "*=200", {})
|
|
|
|
libpry.raises(utils.AnchorError, utils.parse_anchor_spec, "foo=bar", {})
|
2012-04-28 00:42:03 +00:00
|
|
|
|
|
|
|
|
2012-06-07 02:05:42 +00:00
|
|
|
class udata_path(libpry.AutoTree):
|
|
|
|
def test_simple(self):
|
|
|
|
libpry.raises(ValueError, utils.data.path, "nonexistent")
|
|
|
|
|
|
|
|
|
2012-04-28 00:42:03 +00:00
|
|
|
tests = [
|
2012-06-07 02:05:42 +00:00
|
|
|
udata_path(),
|
2012-04-29 00:05:38 +00:00
|
|
|
uparse_anchor_spec()
|
2012-04-28 00:42:03 +00:00
|
|
|
]
|