예제 #1
0
def test_relativepaths_absolute():
    """Indicated paths must be relative."""
    with pytest.raises(ValueError) as cm:
        check_relative_paths("/foo/bar")
    assert str(cm.value) == "must be a valid relative URL"
예제 #2
0
def test_relativepaths_nonstring():
    """Indicated paths must be relative."""
    with pytest.raises(ValueError) as cm:
        check_relative_paths(33)
    assert str(cm.value) == "must be a valid relative URL"
예제 #3
0
def test_relativepaths_ok():
    """Indicated paths must be relative."""
    assert check_relative_paths("foo/bar")