|
22 | 22 |
|
23 | 23 | from diffpy.structure.tests.testutils import datafile |
24 | 24 | from diffpy.structure.parsers.p_cif import P_cif, leading_float, getSymOp |
25 | | -from diffpy.structure.parsers.p_cif import _fixIfWindowsPath |
| 25 | +from diffpy.structure.parsers.p_cif import _quoteLocalPath |
26 | 26 | from diffpy.structure.parsers import getParser |
27 | 27 | from diffpy.structure import Structure |
28 | 28 | from diffpy.structure import StructureFormatError |
@@ -62,16 +62,15 @@ def test_getSymOp(self): |
62 | 62 | return |
63 | 63 |
|
64 | 64 |
|
65 | | - def test__fixIfWindowsPath(self): |
66 | | - "check _fixIfWindowsPath()" |
| 65 | + def test__quoteLocalPath(self): |
| 66 | + "check _quoteLocalPath()" |
67 | 67 | from six.moves.urllib.request import pathname2url as p2u |
68 | | - self.assertEqual('/a/b/c.cif', _fixIfWindowsPath('/a/b/c.cif')) |
69 | | - self.assertEqual(p2u('c:\\a.cif'), _fixIfWindowsPath('c:\\a.cif')) |
70 | | - self.assertEqual(p2u('c:/a.cif'), _fixIfWindowsPath('c:/a.cif')) |
71 | | - self.assertEqual(p2u('abc:/a.cif'), _fixIfWindowsPath('abc:/a.cif')) |
72 | | - self.assertEqual('/x:y/c.cif', _fixIfWindowsPath('/x:y/c.cif')) |
| 68 | + self.assertEqual('/a/b/c.cif', _quoteLocalPath('/a/b/c.cif')) |
| 69 | + self.assertEqual(p2u('c:\\a.cif'), _quoteLocalPath('c:\\a.cif')) |
| 70 | + self.assertEqual(p2u('c:/a.cif'), _quoteLocalPath('c:/a.cif')) |
| 71 | + self.assertEqual('/x:y/c.cif', _quoteLocalPath('/x:y/c.cif')) |
73 | 72 | self.assertEqual('http::cif.org/a.cif', |
74 | | - _fixIfWindowsPath('http::cif.org/a.cif')) |
| 73 | + _quoteLocalPath('http::cif.org/a.cif')) |
75 | 74 | return |
76 | 75 |
|
77 | 76 | # End of class TestRoutines |
|
0 commit comments