(self, pytester: Pytester)
| 131 | assert values == ("y", "z") |
| 132 | |
| 133 | def test_unittest_mock(self, pytester: Pytester) -> None: |
| 134 | pytester.makepyfile( |
| 135 | """ |
| 136 | import unittest.mock |
| 137 | class T(unittest.TestCase): |
| 138 | @unittest.mock.patch("os.path.abspath") |
| 139 | def test_hello(self, abspath): |
| 140 | import os |
| 141 | os.path.abspath("hello") |
| 142 | abspath.assert_any_call("hello") |
| 143 | """ |
| 144 | ) |
| 145 | reprec = pytester.inline_run() |
| 146 | reprec.assertoutcome(passed=1) |
| 147 | |
| 148 | def test_unittest_mock_and_fixture(self, pytester: Pytester) -> None: |
| 149 | pytester.makepyfile( |
nothing calls this directly
no test coverage detected