diff options
author | Ran Benita <ran@unusedvar.com> | 2020-12-26 20:49:17 +0200 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2020-12-26 21:05:02 +0200 |
commit | bd76042344b3c3318dddf991c08d49bbce2251bb (patch) | |
tree | 4dbb6c8ba024b2d92ab55211f4141d07b007eb9a /testing | |
parent | 6d3a66d947a57fed99dcb4bae47062cd9ce6a5f2 (diff) | |
download | pytest-bd76042344b3c3318dddf991c08d49bbce2251bb.tar.gz |
python: export pytest.Metafunc for typing purposes
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
Diffstat (limited to 'testing')
-rw-r--r-- | testing/python/metafunc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py index c50ea53d2..58a902a3a 100644 --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -47,7 +47,7 @@ class TestMetafunc: names = getfuncargnames(func) fixtureinfo: Any = FuncFixtureInfoMock(names) definition: Any = DefinitionMock._create(func, "mock::nodeid") - return python.Metafunc(definition, fixtureinfo, config) + return python.Metafunc(definition, fixtureinfo, config, _ispytest=True) def test_no_funcargs(self) -> None: def function(): |