From 1e2c4d5bd1fd1dc66d17309ffbac533baffcb960 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 15 Nov 2018 13:11:52 +0100 Subject: [PATCH] Fix pytest deprecation warning conftest uses the Function attribute of a pytest.Function object. Latest pytest has deprecated the attribute: _pytest.warning_types.RemovedInPytest4Warning: usage of Function.Function is deprecated, please use pytest.Function instead Signed-off-by: Christian Heimes Reviewed-By: Serhii Tsymbaliuk --- ipatests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipatests/conftest.py b/ipatests/conftest.py index adf222b39..5acee3f3e 100644 --- a/ipatests/conftest.py +++ b/ipatests/conftest.py @@ -130,7 +130,7 @@ def pytest_cmdline_main(config): def pytest_runtest_setup(item): - if isinstance(item, item.Function): + if isinstance(item, pytest.Function): if item.get_marker('skip_ipaclient_unittest'): # pylint: disable=no-member if pytest.config.option.ipaclient_unittests: