Merge remote-tracking branch 'upstream/features' into features

This commit is contained in:
turturica
2018-04-24 13:45:10 -07:00
3 changed files with 14 additions and 0 deletions

View File

@@ -3055,6 +3055,14 @@ class TestShowFixtures(object):
Hi from test module
''')
def test_fixture_disallow_twice(self):
"""Test that applying @pytest.fixture twice generates an error (#2334)."""
with pytest.raises(ValueError):
@pytest.fixture
@pytest.fixture
def foo():
pass
@pytest.mark.parametrize('flavor', ['fixture', 'yield_fixture'])
class TestContextManagerFixtureFuncs(object):