Lines Matching refs:pathname2url
22 from nturl2path import url2pathname, pathname2url
726 return "file://%s" % urllib.request.pathname2url(filePath)
1487 """Test pathname2url() and url2pathname()"""
1493 result = urllib.request.pathname2url(expected_path)
1495 "pathname2url() failed; %s != %s" %
1507 result = urllib.request.pathname2url(given)
1509 "pathname2url() failed; %s != %s" %
1518 result = urllib.request.pathname2url(given)
1520 "pathname2url() failed; %s != %s" %
1532 # Test special prefixes are correctly handled in pathname2url()
1535 result = urllib.request.pathname2url(given)
1537 "pathname2url() failed; %s != %s" %
1541 result = urllib.request.pathname2url(given)
1543 "pathname2url() failed; %s != %s" %
1595 fileurl = "file:" + urllib.request.pathname2url(tmpfile)
1671 self.assertEqual(url2pathname(pathname2url(path)), path)
1676 self.assertEqual(pathname2url("C:"), '///C:')
1677 self.assertEqual(pathname2url("C:\\"), '///C:')
1680 self.assertEqual(pathname2url(r"\\\folder\test" "\\"),
1682 self.assertEqual(pathname2url(r"\\folder\test" "\\"),
1684 self.assertEqual(pathname2url(r"\folder\test" "\\"),
1688 self.assertEqual(pathname2url(r'C:\foo\bar\spam.foo'),
1692 self.assertRaises(IOError, pathname2url, "XX:\\")
1699 self.assertEqual(pathname2url(url2pathname(path)), path)