@@ -0,0 +1,1651 @@
+import pytest%0Aimport functools%0Afrom urllib import parse%0A%0Afrom waterbutler.core import exceptions%0Afrom waterbutler.core.path import WaterButlerPath%0Afrom waterbutler.core.path import WaterButlerPathPart%0A%0A%0Aclass EncodedPathPart:%0A    DECODE = parse.unquote%0A    ENCODE = functools.partial(parse.quote, safe='')%0A%0Aclass EncodedPath:%0A    PART_CLASS = EncodedPathPart%0A%0Aclass TestPathPart:%0A    pass%0A%0Aclass TestPath:%0A%0A    def test_name(self):%0A        path = WaterButlerPath('/this/is/a/long/path')%0A%0A        assert path.name == 'path'%0A%0A    def test_parent(self):%0A        path = WaterButlerPath('/this/is/a/long/path')%0A%0A        assert path.parent.name == 'long'%0A        assert path.parent == WaterButlerPath('/this/is/a/long/')%0A%0A    def test_ending_slash_is_folder(self):%0A        assert WaterButlerPath('/this/is/folder/').is_dir is True%0A        assert WaterButlerPath('/this/is/folder/').is_file is False%0A%0A    def test_no_ending_slash_is_file(self):%0A        assert WaterButlerPath('/this/is/file').is_dir is False%0A        assert WaterButlerPath('/this/is/file').is_file is True%0A%0Aclass TestValidation:%0A%0A    def test_double_slash_is_invalid(self):%0A        with pytest.raises(exceptions.InvalidPathError):%0A            WaterButlerPath('/this//is/a/path')%0A%0A    def test_must_start_with_slash(self):%0A        with pytest.raises(exceptions.InvalidPathError):%0A            WaterButlerPath('this/is/a/path')%0A%0A    def test_cant_be_empty(self):%0A        with pytest.raises(exceptions.InvalidPathError):%0A            WaterButlerPath('')%0A%0A    def test_cant_have_dotdot(self):%0A        with pytest.raises(exceptions.InvalidPathError):%0A            WaterButlerPath('/etc/nginx/../')%0A%0A

add some tests for WaterButlerPath