def test_path_to_url_win(): assert path_to_url('c:/tmp/file') == 'file:///c:/tmp/file' assert path_to_url('c:\\tmp\\file') == 'file:///c:/tmp/file' path = os.path.join(os.getcwd(), 'file') assert path_to_url('file') == 'file:' + pathname2url(path)
def test_path_to_url_unix(): assert path_to_url('/tmp/file') == 'file:///tmp/file' path = os.path.join(os.getcwd(), 'file') assert path_to_url('file') == 'file://' + pathname2url(path)