Test permission error handling.
(
tmp_path: Path,
capsys: pytest.CaptureFixture[str],
)
| 235 | |
| 236 | @pytest.mark.skipif(sys.platform != "linux", reason="Only supported on Linux") |
| 237 | def test_permission_error( |
| 238 | tmp_path: Path, |
| 239 | capsys: pytest.CaptureFixture[str], |
| 240 | ) -> None: |
| 241 | """Test permission error handling.""" |
| 242 | fname = tmp_path / "unreadable.txt" |
| 243 | fname.write_text("abandonned\n") |
| 244 | result = cs.main(fname, std=True) |
| 245 | assert isinstance(result, tuple) |
| 246 | _, _, stderr = result |
| 247 | assert "WARNING:" not in stderr |
| 248 | fname.chmod(0o000) |
| 249 | result = cs.main(fname, std=True) |
| 250 | assert isinstance(result, tuple) |
| 251 | _, _, stderr = result |
| 252 | assert "WARNING:" in stderr |
| 253 | |
| 254 | |
| 255 | def test_interactivity( |
nothing calls this directly
no test coverage detected
searching dependent graphs…