MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_setupfunc_missing_funcarg

Method test_setupfunc_missing_funcarg

testing/python/fixtures.py:3322–3337  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

3320 )
3321
3322 def test_setupfunc_missing_funcarg(self, pytester: Pytester) -> None:
3323 pytester.makepyfile(
3324 """
3325 import pytest
3326 @pytest.fixture(autouse=True)
3327 def gen(qwe123):
3328 return 1
3329 def test_something():
3330 pass
3331 """
3332 )
3333 result = pytester.runpytest()
3334 assert result.ret != 0
3335 result.stdout.fnmatch_lines(
3336 ["*def gen(qwe123):*", "*fixture*qwe123*not found*", "*1 error*"]
3337 )
3338
3339
3340class TestShowFixtures:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected