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

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

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

    assert xt.parsetile(instring) == "[255, 300, 13]"
Exemple #7
0
def test_parsetile_slash():
    instring = "junk/junk/junk/junk/13/255/300.junk"

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