(self)
| 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 | |
| 68 | class ReadOnly(_SQLiteDbmTests): |
nothing calls this directly
no test coverage detected