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

Method test_receives_funcargs

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

Source from the content-addressed store, hash-verified

1193 reprec.assertoutcome(passed=1)
1194
1195 def test_receives_funcargs(self, pytester: Pytester) -> None:
1196 pytester.makepyfile(
1197 """
1198 import pytest
1199 @pytest.fixture()
1200 def arg1():
1201 return 1
1202
1203 @pytest.fixture()
1204 def arg2(arg1):
1205 return arg1 + 1
1206
1207 def test_add(arg2):
1208 assert arg2 == 2
1209 def test_all(arg1, arg2):
1210 assert arg1 == 1
1211 assert arg2 == 2
1212 """
1213 )
1214 reprec = pytester.inline_run()
1215 reprec.assertoutcome(passed=2)
1216
1217 def test_receives_funcargs_scope_mismatch(self, pytester: Pytester) -> None:
1218 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