From 9bc5ecc6c9423d32575bc5936998a6bce512d163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 19 Jul 2019 11:19:07 +0200 Subject: [PATCH] Use fixturenames instead of funcargnames The later is obsolete with pytest5+ --- testing/conftest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/conftest.py b/testing/conftest.py index 962fc67e..3630236b 100644 --- a/testing/conftest.py +++ b/testing/conftest.py @@ -83,8 +83,8 @@ def getsocketspec(config=None): def pytest_generate_tests(metafunc): - if 'gw' in metafunc.funcargnames: - assert 'anypython' not in metafunc.funcargnames, "need combine?" + if 'gw' in metafunc.fixturenames: + assert 'anypython' not in metafunc.fixturenames, "need combine?" if hasattr(metafunc.function, 'gwtypes'): gwtypes = metafunc.function.gwtypes elif hasattr(metafunc.cls, 'gwtype'): @@ -92,7 +92,7 @@ def pytest_generate_tests(metafunc): else: gwtypes = ['popen', 'socket', 'ssh', 'proxy'] metafunc.parametrize("gw", gwtypes, indirect=True) - elif 'anypython' in metafunc.funcargnames: + elif 'anypython' in metafunc.fixturenames: metafunc.parametrize( "anypython", indirect=True, argvalues=( 'sys.executable', 'python2.7', 'pypy', 'jython',