Deprecate calling fixture functions directly

This will now issue a RemovedInPytest4Warning when the user calls
a fixture function directly, instead of requesting it from test
functions as is expected

Fix #3661
This commit is contained in:
Bruno Oliveira
2018-07-22 11:10:44 -03:00
parent f8749eeb5c
commit 011f88f7e7
11 changed files with 103 additions and 42 deletions

View File

@@ -0,0 +1,7 @@
import pytest
@pytest.mark.parametrize("a", [r"qwe/\abc"])
def test_fixture(tmpdir, a):
tmpdir.check(dir=1)
assert tmpdir.listdir() == []