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 <cheimes@redhat.com>
Reviewed-By: Serhii Tsymbaliuk <stsymbal@redhat.com>
This commit is contained in:
Christian Heimes 2018-11-15 13:11:52 +01:00
parent 13917ddc55
commit 1e2c4d5bd1

View File

@ -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: