MCPcopy
hub / github.com/pytest-dev/pytest / check_tests_in_output

Method check_tests_in_output

testing/acceptance_test.py:1004–1015  ·  view source on GitHub ↗
(
        lines: Sequence[str], *expected_test_numbers: int, number_of_tests: int = 3
    )

Source from the content-addressed store, hash-verified

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)

Calls 1

endswithMethod · 0.80

Tested by

no test coverage detected