Ensure that deleting long path works (particularly on Windows (#6775)).
(tmp_path: Path)
| 471 | |
| 472 | |
| 473 | def test_long_path_during_cleanup(tmp_path: Path) -> None: |
| 474 | """Ensure that deleting long path works (particularly on Windows (#6775)).""" |
| 475 | path = (tmp_path / ("a" * 250)).resolve() |
| 476 | if sys.platform == "win32": |
| 477 | # make sure that the full path is > 260 characters without any |
| 478 | # component being over 260 characters |
| 479 | assert len(str(path)) > 260 |
| 480 | extended_path = "\\\\?\\" + str(path) |
| 481 | else: |
| 482 | extended_path = str(path) |
| 483 | os.mkdir(extended_path) |
| 484 | assert os.path.isdir(extended_path) |
| 485 | maybe_delete_a_numbered_dir(path) |
| 486 | assert not os.path.isdir(extended_path) |
| 487 | |
| 488 | |
| 489 | def test_get_extended_length_path_str() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…