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

Method test_noargfixturedec

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

Source from the content-addressed store, hash-verified

1178
1179class TestFixtureUsages:
1180 def test_noargfixturedec(self, pytester: Pytester) -> None:
1181 pytester.makepyfile(
1182 """
1183 import pytest
1184 @pytest.fixture
1185 def arg1():
1186 return 1
1187
1188 def test_func(arg1):
1189 assert arg1 == 1
1190 """
1191 )
1192 reprec = pytester.inline_run()
1193 reprec.assertoutcome(passed=1)
1194
1195 def test_receives_funcargs(self, pytester: Pytester) -> None:
1196 pytester.makepyfile(

Callers

nothing calls this directly

Calls 3

assertoutcomeMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected