Integration Testing
-
When
pytestruns a test case or another fixture, it looks at the argument names of that function/method, for each argument,pytesttries to find a fixture with exactly the same name as the argument. E.g. here,test_examplereceives the value 123 because there’s a fixture namedfoo, andpytestmatches the argumentfoointest_exampleto the fixture name:@pytest.fixture def foo(): return 123 def test_example(foo): assert foo == 123