The .pytest_cache directory should have world-readable permissions (depending on umask). Regression test for #12308.
(self, pytester: Pytester)
| 32 | assert p.is_dir() |
| 33 | |
| 34 | def test_cache_dir_permissions(self, pytester: Pytester) -> None: |
| 35 | """The .pytest_cache directory should have world-readable permissions |
| 36 | (depending on umask). |
| 37 | |
| 38 | Regression test for #12308. |
| 39 | """ |
| 40 | pytester.makeini("[pytest]") |
| 41 | config = pytester.parseconfigure() |
| 42 | assert config.cache is not None |
| 43 | p = config.cache.mkdir("name") |
| 44 | assert p.is_dir() |
| 45 | # Instead of messing with umask, make sure .pytest_cache has the same |
| 46 | # permissions as the default that `mkdir` gives `p`. |
| 47 | assert (p.parent.stat().st_mode & 0o777) == (p.stat().st_mode & 0o777) |
| 48 | |
| 49 | def test_config_cache_dataerror(self, pytester: Pytester) -> None: |
| 50 | pytester.makeini("[pytest]") |
nothing calls this directly
no test coverage detected