コード例 #1
0
def test_translate_illegal_characters():
    with pytest.raises(RuntimeError,
                       match="does not match the supported pattern"):
        translate("old-v0 -> new-v1")
    with pytest.raises(RuntimeError,
                       match="does not match the supported pattern"):
        translate("old-<3=->=new-<3")
コード例 #2
0
def test_translate_none():
    with pytest.raises(RuntimeError, match="does not match the supported pattern"):
        translate("")
    assert translate("old") == ("old", None)
コード例 #3
0
def test_translate_with_underscores():
    assert translate("old_v0 -> new_v1") == ("old_v0", "new_v1")
コード例 #4
0
def test_translate_simple():
    assert translate("old -> new") == ("old", "new")
コード例 #5
0
def test_translate_simple():
    assert translate("old -> new") == ('old', 'new')