def test_strip_protocol_expanduser(): path = "file://~\\foo\\bar" if WIN else "file://~/foo/bar" stripped = LocalFileSystem._strip_protocol(path) assert path != stripped assert "file://" not in stripped assert stripped.startswith(os.path.expanduser("~").replace("\\", "/")) assert not LocalFileSystem._strip_protocol("./").endswith("/")
def test_strip_protocol_expanduser(): path = "file://~\\foo\\bar" if sys.platform == "win32" else "file://~/foo/bar" stripped = LocalFileSystem._strip_protocol(path) assert path != stripped assert "file://" not in stripped assert getpass.getuser() in stripped
def test_strip_protocol_expanduser(): path = "file://~\\foo\\bar" if sys.platform == "win32" else "file://~/foo/bar" stripped = LocalFileSystem._strip_protocol(path) assert path != stripped assert "file://" not in stripped assert stripped.startswith(os.path.expanduser("~").replace("\\", "/"))