(self, pytester: Pytester)
| 25 | assert p.is_dir() |
| 26 | |
| 27 | def test_config_cache_dataerror(self, pytester: Pytester) -> None: |
| 28 | pytester.makeini("[pytest]") |
| 29 | config = pytester.parseconfigure() |
| 30 | assert config.cache is not None |
| 31 | cache = config.cache |
| 32 | pytest.raises(TypeError, lambda: cache.set("key/name", cache)) |
| 33 | config.cache.set("key/name", 0) |
| 34 | config.cache._getvaluepath("key/name").write_bytes(b"123invalid") |
| 35 | val = config.cache.get("key/name", -2) |
| 36 | assert val == -2 |
| 37 | |
| 38 | @pytest.mark.filterwarnings("ignore:could not create cache path") |
| 39 | def test_cache_writefail_cachfile_silent(self, pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected