(self, monkeypatch: MonkeyPatch, path_type)
| 398 | assert getattr(sys, other_path_type) == original_other |
| 399 | |
| 400 | def test_preserve_container(self, monkeypatch: MonkeyPatch, path_type) -> None: |
| 401 | other_path_type = self.other_path[path_type] |
| 402 | original_data = list(getattr(sys, path_type)) |
| 403 | original_other = getattr(sys, other_path_type) |
| 404 | original_other_data = list(original_other) |
| 405 | new: list[object] = [] |
| 406 | snapshot = SysPathsSnapshot() |
| 407 | monkeypatch.setattr(sys, path_type, new) |
| 408 | snapshot.restore() |
| 409 | assert getattr(sys, path_type) is new |
| 410 | assert getattr(sys, path_type) == original_data |
| 411 | assert getattr(sys, other_path_type) is original_other |
| 412 | assert getattr(sys, other_path_type) == original_other_data |
| 413 | |
| 414 | |
| 415 | def test_pytester_subprocess(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected