(self, monkeypatch, prefix, source, expected)
| 1740 | ], |
| 1741 | ) |
| 1742 | def test_get_cache_dir(self, monkeypatch, prefix, source, expected) -> None: |
| 1743 | monkeypatch.delenv("PYTHONPYCACHEPREFIX", raising=False) |
| 1744 | |
| 1745 | if prefix is not None and sys.version_info < (3, 8): |
| 1746 | pytest.skip("pycache_prefix not available in py<38") |
| 1747 | monkeypatch.setattr(sys, "pycache_prefix", prefix, raising=False) |
| 1748 | |
| 1749 | assert get_cache_dir(Path(source)) == Path(expected) |
| 1750 | |
| 1751 | @pytest.mark.skipif( |
| 1752 | sys.version_info < (3, 8), reason="pycache_prefix not available in py<38" |
nothing calls this directly
no test coverage detected