diff --git a/src/pytest_cov/plugin.py b/src/pytest_cov/plugin.py index 0c6d378e..2812d2bc 100644 --- a/src/pytest_cov/plugin.py +++ b/src/pytest_cov/plugin.py @@ -254,10 +254,9 @@ def pytest_runtest_teardown(self, item): self.cov = None -def pytest_funcarg__cov(request): - """A pytest funcarg that provides access to the underlying coverage - object. - """ +@pytest.fixture +def cov(request): + """A pytest fixture to provide access to the underlying coverage object.""" # Check with hasplugin to avoid getplugin exception in older pytest. if request.config.pluginmanager.hasplugin('_cov'):