(
lines: Sequence[str], *expected_test_numbers: int, number_of_tests: int = 3
)
| 1002 | |
| 1003 | @staticmethod |
| 1004 | def check_tests_in_output( |
| 1005 | lines: Sequence[str], *expected_test_numbers: int, number_of_tests: int = 3 |
| 1006 | ) -> None: |
| 1007 | found_test_numbers = { |
| 1008 | test_number |
| 1009 | for test_number in range(1, number_of_tests + 1) |
| 1010 | if any( |
| 1011 | line.endswith(f"test_{test_number}") and " call " in line |
| 1012 | for line in lines |
| 1013 | ) |
| 1014 | } |
| 1015 | assert found_test_numbers == set(expected_test_numbers) |
| 1016 | |
| 1017 | def test_with_deselected(self, pytester: Pytester, mock_timing) -> None: |
| 1018 | pytester.makepyfile(self.source) |
no test coverage detected