MCPcopy Index your code
hub / github.com/python/cpython / test_uri_windows

Method test_uri_windows

Lib/test/test_dbm_sqlite3.py:49–65  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47
48 @unittest.skipUnless(sys.platform == "win32", "requires Windows")
49 def test_uri_windows(self):
50 dataset = (
51 # Relative subdir.
52 (r"2018\January.xlsx",
53 "2018/January.xlsx"),
54 # Absolute with drive letter.
55 (r"C:\Projects\apilibrary\apilibrary.sln",
56 "/C:/Projects/apilibrary/apilibrary.sln"),
57 # Relative with drive letter.
58 (r"C:Projects\apilibrary\apilibrary.sln",
59 "/C:Projects/apilibrary/apilibrary.sln"),
60 )
61 for path, normalized in dataset:
62 with self.subTest(path=path, normalized=normalized):
63 if not Path(path).is_absolute():
64 self.skipTest(f"skipping relative path: {path!r}")
65 self.assertEndsWith(_normalize_uri(path), normalized)
66
67
68class ReadOnly(_SQLiteDbmTests):

Callers

nothing calls this directly

Calls 6

PathClass · 0.90
_normalize_uriFunction · 0.90
is_absoluteMethod · 0.80
skipTestMethod · 0.80
assertEndsWithMethod · 0.80
subTestMethod · 0.45

Tested by

no test coverage detected