An imported mock.call would break setup/factory discovery due to it being callable and __code__ not being a code object.
(self, pytester: Pytester)
| 1868 | reprec.assertoutcome(passed=2) |
| 1869 | |
| 1870 | def test_callables_nocode(self, pytester: Pytester) -> None: |
| 1871 | """An imported mock.call would break setup/factory discovery due to |
| 1872 | it being callable and __code__ not being a code object.""" |
| 1873 | pytester.makepyfile( |
| 1874 | """ |
| 1875 | class _call(tuple): |
| 1876 | def __call__(self, *k, **kw): |
| 1877 | pass |
| 1878 | def __getattr__(self, k): |
| 1879 | return self |
| 1880 | |
| 1881 | call = _call() |
| 1882 | """ |
| 1883 | ) |
| 1884 | reprec = pytester.inline_run("-s") |
| 1885 | reprec.assertoutcome(failed=0, passed=0) |
| 1886 | |
| 1887 | def test_autouse_in_conftests(self, pytester: Pytester) -> None: |
| 1888 | a = pytester.mkdir("a") |
nothing calls this directly
no test coverage detected