(pytester: Pytester)
| 25 | |
| 26 | |
| 27 | def test_runTest_method(pytester: Pytester) -> None: |
| 28 | pytester.makepyfile( |
| 29 | """ |
| 30 | import unittest |
| 31 | class MyTestCaseWithRunTest(unittest.TestCase): |
| 32 | def runTest(self): |
| 33 | self.assertEqual('foo', 'foo') |
| 34 | class MyTestCaseWithoutRunTest(unittest.TestCase): |
| 35 | def runTest(self): |
| 36 | self.assertEqual('foo', 'foo') |
| 37 | def test_something(self): |
| 38 | pass |
| 39 | """ |
| 40 | ) |
| 41 | result = pytester.runpytest("-v") |
| 42 | result.stdout.fnmatch_lines( |
| 43 | """ |
| 44 | *MyTestCaseWithRunTest::runTest* |
| 45 | *MyTestCaseWithoutRunTest::test_something* |
| 46 | *2 passed* |
| 47 | """ |
| 48 | ) |
| 49 | |
| 50 | |
| 51 | def test_isclasscheck_issue53(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected