Move human-friendly format functions to netlib.human, remove redundant implementations

This commit is contained in:
Aldo Cortesi
2016-05-31 19:32:08 +12:00
parent ec34cae618
commit b2f63458fc
17 changed files with 110 additions and 141 deletions

View File

@@ -13,13 +13,6 @@ def test_membool():
assert m.v == 2
def test_parse_size():
assert utils.parse_size("100") == 100
assert utils.parse_size("100k") == 100 * 1024
tutils.raises("invalid size spec", utils.parse_size, "foo")
tutils.raises("invalid size spec", utils.parse_size, "100kk")
def test_parse_anchor_spec():
assert utils.parse_anchor_spec("foo=200") == ("foo", "200")
assert utils.parse_anchor_spec("foo") is None