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

Method test_fixture_disallow_twice

testing/python/fixtures.py:3618–3625  ·  view source on GitHub ↗

Test that applying @pytest.fixture twice generates an error (#2334).

(self)

Source from the content-addressed store, hash-verified

3616 )
3617
3618 def test_fixture_disallow_twice(self):
3619 """Test that applying @pytest.fixture twice generates an error (#2334)."""
3620 with pytest.raises(ValueError):
3621
3622 @pytest.fixture
3623 @pytest.fixture
3624 def foo():
3625 raise NotImplementedError()
3626
3627
3628class TestContextManagerFixtureFuncs:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected