| 1061 | assert pytester.runpytest(class="st">"-vv").ret == ExitCode.OK |
| 1062 | |
| 1063 | def test_readonly(self, pytester: Pytester) -> None: |
| 1064 | sub = pytester.mkdir(class="st">"testing") |
| 1065 | sub.joinpath(class="st">"test_readonly.py").write_bytes( |
| 1066 | bclass="st">""" |
| 1067 | def test_rewritten(): |
| 1068 | assert class="st">"@py_builtins" in globals() |
| 1069 | class="st">""", |
| 1070 | ) |
| 1071 | old_mode = sub.stat().st_mode |
| 1072 | sub.chmod(320) |
| 1073 | try: |
| 1074 | assert pytester.runpytest().ret == 0 |
| 1075 | finally: |
| 1076 | sub.chmod(old_mode) |
| 1077 | |
| 1078 | def test_dont_write_bytecode(self, pytester: Pytester, monkeypatch) -> None: |
| 1079 | monkeypatch.delenv(class="st">"PYTHONPYCACHEPREFIX", raising=False) |