(pytester: Pytester)
| 9 | |
| 10 | |
| 11 | def test_simple_unittest(pytester: Pytester) -> None: |
| 12 | testpath = pytester.makepyfile( |
| 13 | """ |
| 14 | import unittest |
| 15 | class MyTestCase(unittest.TestCase): |
| 16 | def testpassing(self): |
| 17 | self.assertEqual('foo', 'foo') |
| 18 | def test_failing(self): |
| 19 | self.assertEqual('foo', 'bar') |
| 20 | """ |
| 21 | ) |
| 22 | reprec = pytester.inline_run(testpath) |
| 23 | assert reprec.matchreport("testpassing").passed |
| 24 | assert reprec.matchreport("test_failing").failed |
| 25 | |
| 26 | |
| 27 | def test_runTest_method(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected