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

Method test_noself_in_method

testing/python/metafunc.py:1049–1061  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

1047 )
1048
1049 def test_noself_in_method(self, pytester: Pytester) -> None:
1050 p = pytester.makepyfile(
1051 """
1052 def pytest_generate_tests(metafunc):
1053 assert 'xyz' not in metafunc.fixturenames
1054
1055 class TestHello(object):
1056 def test_hello(xyz):
1057 pass
1058 """
1059 )
1060 result = pytester.runpytest(p)
1061 result.assert_outcomes(passed=1)
1062
1063 def test_generate_tests_in_class(self, pytester: Pytester) -> None:
1064 p = pytester.makepyfile(

Callers

nothing calls this directly

Calls 3

assert_outcomesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected