Feed a test only with initialnames, not the whole fixture closure by sadra-barikbin · Pull Request #11284 · pytest-dev/pytest (original) (raw)
For reference, here are the usages of funcargs
I've found in my "plugin corpus" (I tried to remove irrelevant matches):
Details
pytest-docker-tools/pytest_docker_tools/plugin.py 31: if "request" not in item.funcargs: 34: for name, fixturedef in item.funcargs["request"]._fixture_defs.items():
pytest-monitor/pytest_monitor/pytest_monitor.py 199: funcargs = pyfuncitem.funcargs 200: testargs = {arg: funcargs[arg] for arg in pyfuncitem._fixtureinfo.argnames}
pytest-aio/pytest_aio/plugin.py 51: backend: Tuple[str, Dict] = pyfuncitem.funcargs.get("aiolib") # type: ignore 68: funcargs = pyfuncitem.funcargs 69: testargs = {arg: funcargs[arg] for arg in pyfuncitem._fixtureinfo.argnames}
pytest_marker_bugzilla/pytest_marker_bugzilla.py 152: bugs = item.funcargs["bugs"] 229: item.funcargs["bugs"] = cache[bugs]
pytest-benchmark/src/pytest_benchmark/plugin.py 475: fixture = hasattr(item, 'funcargs') and item.funcargs.get('benchmark')
pytest-twisted/pytest_twisted.py 410: for name, value in pyfuncitem.funcargs.items()
pytest-play/pytest_play/plugin.py 104: self.funcargs = {} 107: cls=None, funcargs=False)
pytest-flakefinder/pytest_flakefinder.py 88: # without this, funcargs ends up being None
python-pytest-cases/src/pytest_cases/plugin.py 69: # now item.funcargs exists so we can handle it 70: if hasattr(item, "funcargs"): 71: item.funcargs = {argname: get_lazy_args(argvalue, item) 72: for argname, argvalue in item.funcargs.items()} 1031: print("\n".join(["%s[%s]: funcargs=%s, params=%s" % (get_pytest_nodeid(self.metafunc), 1032: c.id, c.funcargs, c.params) 1104: if fixture not in c.params and fixture not in c.funcargs: 1129: if fixture_name not in c.params and fixture_name not in c.funcargs: 1153: # if fixture_name in c.params or fixture_name in c.funcargs or n.requires(fixture_name): 1226:# if fixture_name not in c.params and fixture_name not in c.funcargs: 1256:# if fixture_name not in c.params and fixture_name not in c.funcargs:
python-pytest-cases/src/pytest_cases/common_pytest.py 693: self.required_fixtures = tuple(f for f in self.fixturenames if f not in self._calls[0].funcargs)
pytest-tornado/pytest_tornado/plugin.py 91: io_loop = pyfuncitem.funcargs.get('io_loop') 94: funcargs = dict((arg, pyfuncitem.funcargs[arg]) 98: future = tornado.gen.convert_yielded(coroutine(**funcargs)) 101: future = coroutine(**funcargs)
pytest-android/src/pytest_android/hooks.py 19: for k, v in node.funcargs.items():
pytest-wdl/pytest_wdl/loader.py 102: self.funcargs = {}
pytest-testrail-client/pytest_testrail_client/pytest_testrail_client.py 493: for key, value in request.node.funcargs.items():
pytest-golden/pytest_golden/plugin.py 384: fixt = item.funcargs.get(FIXTURE_NAME)
pytest-xlog/src/pytest_xlog/plugin.py 104: if params == list(item.funcargs.values()):
pytest-github/pytest_github/plugin.py 291: issue_urls = item.funcargs["github_issues"] 325: if marker is not None and hasattr(item, 'funcargs'): 340: item.funcargs["github_issues"] = issue_urls
pytest-airflow/pytest_airflow/plugin.py 519: funcargs = pyfuncitem.funcargs 525: testkwargs[arg] = funcargs[arg]
pytest-lazy-fixture/pytest_lazyfixture.py 36: elif param not in item.funcargs: 37: item.funcargs[param] = request.getfixturevalue(param) 51: if hasattr(item, 'funcargs'): 52: for arg, val in item.funcargs.items(): 54: item.funcargs[arg] = item._request.getfixturevalue(val.name) 74: normalize_metafunc_calls(metafunc, 'funcargs') 120: if fname not in callspec.params and fname not in callspec.funcargs]
pytest-leaks/pytest_leaks/plugin.py 154: item.funcargs = None
pytest-failed-screenshot/pytest_failed_screenshot.py 44: for value in item.funcargs.values():
pytest-aws/conftest.py 286:def get_metadata_from_funcargs(funcargs): 288: for k in funcargs: 289: if isinstance(funcargs[k], dict): 290: metadata = {**metadata, **extract_metadata(funcargs[k])} 342: metadata = get_metadata_from_funcargs(item.funcargs)
pytest-curio/pytest_curio/plugin.py 27: kernel = pyfuncitem.funcargs['kernel'] 28: funcargs = pyfuncitem.funcargs 29: testargs = {arg: funcargs[arg] for arg in pyfuncitem._fixtureinfo.argnames}
pytest-tornasync/src/pytest_tornasync/plugin.py 41: funcargs = pyfuncitem.funcargs 42: testargs = {arg: funcargs[arg] for arg in pyfuncitem._fixtureinfo.argnames} 49: loop = funcargs["io_loop"]
pytest-molecule/src/pytest_molecule/init.py 169: self.funcargs = {}
pytest-sanic/pytest_sanic/plugin.py 71: loop = pyfuncitem.funcargs[LOOP_KEY] 72: funcargs = pyfuncitem.funcargs 75: testargs[arg] = funcargs[arg]
pytest-yield/pytest_yield/plugin.py 204: item.funcargs = None 243: funcargs = pyfuncitem.funcargs 246: testargs[arg] = funcargs[arg]
pytest-scenario/pytest_scenario/plugin.py 92: item.funcargs[argname] = item._request.getfuncargvalue(func)
pytest-plugins/pytest-webdriver/pytest_webdriver.py 97: if not hasattr(item, 'funcargs') or not 'webdriver' in item.funcargs: 104: item.funcargs['webdriver'].get_screenshot_as_file(fname)
pytest-trello/pytest_trello/plugin.py 143: cards = item.funcargs.get('cards', []) 243: cards = item.funcargs["cards"] 272: item.funcargs["cards"] = TrelloCardList(self.api, *cards, **marker.kwargs)
pytest-reraise/pytest_reraise/reraise.py 129: if hasattr(item, "funcargs") and "reraise" in item.funcargs: 130: reraise = item.funcargs["reraise"]
pigeonhole/pigeonhole/plugin.py 81: report.pigeonhole_index = item.funcargs.get(self._fixture_name, NOT_APPLICABLE)
pytest-ansible/src/pytest_ansible/molecule.py 135: self.funcargs = {}
pytest-count/pytest_count.py 56: extra = ' (%s)' % item.funcargs['tmpdir']