| 281 | (b'c:\\\xff', b'\xfe')) |
| 282 | |
| 283 | def test_isabs(self): |
| 284 | tester('ntpath.isabs("foo\\bar")', 0) |
| 285 | tester('ntpath.isabs("foo/bar")', 0) |
| 286 | tester('ntpath.isabs("c:\\")', 1) |
| 287 | tester('ntpath.isabs("c:\\foo\\bar")', 1) |
| 288 | tester('ntpath.isabs("c:/foo/bar")', 1) |
| 289 | tester('ntpath.isabs("\\\\conky\\mountpoint\\")', 1) |
| 290 | |
| 291 | # gh-44626: paths with only a drive or root are not absolute. |
| 292 | tester('ntpath.isabs("\\foo\\bar")', 0) |
| 293 | tester('ntpath.isabs("/foo/bar")', 0) |
| 294 | tester('ntpath.isabs("c:foo\\bar")', 0) |
| 295 | tester('ntpath.isabs("c:foo/bar")', 0) |
| 296 | |
| 297 | # gh-96290: normal UNC paths and device paths without trailing backslashes |
| 298 | tester('ntpath.isabs("\\\\conky\\mountpoint")', 1) |
| 299 | tester('ntpath.isabs("\\\\.\\C:")', 1) |
| 300 | |
| 301 | def test_commonprefix(self): |
| 302 | with warnings_helper.check_warnings((".*commonpath().*", DeprecationWarning)): |