Test summary functionality.
(
tmp_path: Path,
capsys: pytest.CaptureFixture[str],
)
| 319 | |
| 320 | |
| 321 | def test_summary( |
| 322 | tmp_path: Path, |
| 323 | capsys: pytest.CaptureFixture[str], |
| 324 | ) -> None: |
| 325 | """Test summary functionality.""" |
| 326 | fname = tmp_path / "tmp" |
| 327 | fname.touch() |
| 328 | result = cs.main(fname, std=True, count=False) |
| 329 | assert isinstance(result, tuple) |
| 330 | code, stdout, stderr = result |
| 331 | assert code == 0 |
| 332 | assert not stdout |
| 333 | assert not stderr, "no output" |
| 334 | result = cs.main(fname, "--summary", std=True) |
| 335 | assert isinstance(result, tuple) |
| 336 | code, stdout, stderr = result |
| 337 | assert code == 0 |
| 338 | assert stderr == "0\n" |
| 339 | assert "SUMMARY" in stdout |
| 340 | assert len(stdout.split("\n")) == 5 |
| 341 | fname.write_text("abandonned\nabandonned") |
| 342 | assert code == 0 |
| 343 | result = cs.main(fname, "--summary", std=True) |
| 344 | assert isinstance(result, tuple) |
| 345 | code, stdout, stderr = result |
| 346 | assert stderr == "2\n" |
| 347 | assert "SUMMARY" in stdout |
| 348 | assert len(stdout.split("\n")) == 7 |
| 349 | assert "abandonned" in stdout.split()[-2] |
| 350 | |
| 351 | |
| 352 | def test_ignore_dictionary( |
nothing calls this directly
no test coverage detected
searching dependent graphs…