(self, monkeypatch: MonkeyPatch, path_type)
| 407 | assert getattr(sys, other_path_type) == original_other |
| 408 | |
| 409 | def test_preserve_container(self, monkeypatch: MonkeyPatch, path_type) -> None: |
| 410 | other_path_type = self.other_path[path_type] |
| 411 | original_data = list(getattr(sys, path_type)) |
| 412 | original_other = getattr(sys, other_path_type) |
| 413 | original_other_data = list(original_other) |
| 414 | new: List[object] = [] |
| 415 | snapshot = SysPathsSnapshot() |
| 416 | monkeypatch.setattr(sys, path_type, new) |
| 417 | snapshot.restore() |
| 418 | assert getattr(sys, path_type) is new |
| 419 | assert getattr(sys, path_type) == original_data |
| 420 | assert getattr(sys, other_path_type) is original_other |
| 421 | assert getattr(sys, other_path_type) == original_other_data |
| 422 | |
| 423 | |
| 424 | def test_pytester_subprocess(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected