Add example for package recursion bug

This commit is contained in:
Bruno Oliveira 2018-08-02 15:18:36 -03:00
parent a76cc8f8c4
commit dcafb8c48c
4 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,2 @@
def pytest_ignore_collect(path):
return False

View File

@ -0,0 +1,2 @@
def test():
pass

View File

@ -1577,3 +1577,9 @@ def test_keep_duplicates(testdir):
) )
result = testdir.runpytest("--keep-duplicates", a.strpath, a.strpath) result = testdir.runpytest("--keep-duplicates", a.strpath, a.strpath)
result.stdout.fnmatch_lines(["*collected 2 item*"]) result.stdout.fnmatch_lines(["*collected 2 item*"])
def test_package_collection_infinite_recursion(testdir):
testdir.copy_example("collect/package_infinite_recursion")
result = testdir.runpytest()
result.stdout.fnmatch_lines("*1 passed*")