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