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

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

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

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

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