Пример #1
0
def test_parsetile_mercantileish_roundtrip():
    instring = "[255, 300, 13]"
    assert xt.parsetile(xt.parsetile(instring)) == instring
Пример #2
0
def test_parsetile_nomatch():
    instring = "fail-obvi-100-100.junk"

    with pytest.raises(ValueError):
        xt.parsetile(instring)
Пример #3
0
def test_parsetile_mercantileish_dash():
    instring = "[255, 300, 13]"
    assert xt.parsetile(instring, "-") == "13-255-300"
Пример #4
0
def test_parsetile_mercantileish():
    instring = "[255, 300, 13]"
    assert xt.parsetile(instring) == "13/255/300"
Пример #5
0
def test_parsetile_parse_last_slash():
    instring = "junk 100-100-100 13/255/300.junk"

    assert xt.parsetile(instring) == "[255, 300, 13]"
Пример #6
0
def test_parsetile_mix():
    instring = "junk/junk-junk/junk/13-255-300.junk"

    assert xt.parsetile(instring) == "[255, 300, 13]"
Пример #7
0
def test_parsetile_slash():
    instring = "junk/junk/junk/junk/13/255/300.junk"

    assert xt.parsetile(instring) == "[255, 300, 13]"