reports: BaseReport.{passed,failed,skipped} more friendly to mypy

Not smart enough to understand the previous code.
This commit is contained in:
Ran Benita
2020-12-30 14:37:00 +02:00
parent 5f11a35b99
commit 7d306e9e86
2 changed files with 16 additions and 7 deletions

View File

@@ -2230,19 +2230,19 @@ def test_skip_reasons_folding() -> None:
ev1 = cast(CollectReport, X())
ev1.when = "execute"
ev1.skipped = True
ev1.skipped = True # type: ignore[misc]
ev1.longrepr = longrepr
ev2 = cast(CollectReport, X())
ev2.when = "execute"
ev2.longrepr = longrepr
ev2.skipped = True
ev2.skipped = True # type: ignore[misc]
# ev3 might be a collection report
ev3 = cast(CollectReport, X())
ev3.when = "collect"
ev3.longrepr = longrepr
ev3.skipped = True
ev3.skipped = True # type: ignore[misc]
values = _folded_skips(Path.cwd(), [ev1, ev2, ev3])
assert len(values) == 1