@pytest.mark.parametrize('original,expected', (('abc', 'abc'), ('/foo/bar', '~2Ffoo~2Fbar'), ('/-/bar', '~2F-~2Fbar'), ('-/db-/table.csv', '-~2Fdb-~2Ftable~2Ecsv'), ('%~-/', '~25~7E-~2F'), ('~25~7E~2D~2F', '~7E25~7E7E~7E2D~7E2F')))
def test_tilde_encoding(original, expected):
    actual = utils.tilde_encode(original)
    assert (actual == expected)
    assert (original == utils.tilde_decode(actual))
@pytest.mark.parametrize('original,expected', (('abc', 'abc'), ('/foo/bar', '~2Ffoo~2Fbar'), ('/-/bar', '~2F-~2Fbar'), ('-/db-/table.csv', '-~2Fdb-~2Ftable~2Ecsv'), ('%~-/', '~25~7E-~2F'), ('~25~7E~2D~2F', '~7E25~7E7E~7E2D~7E2F')))
def test_tilde_encoding(original, expected):
    actual = utils.tilde_encode(original)
    assert (actual == expected)
    assert (original == utils.tilde_decode(actual))