Fix 'Package has no len()' error during collection

Fix #3749
This commit is contained in:
Bruno Oliveira
2018-09-20 17:52:35 -03:00
parent 7a5e11bbcf
commit 41f6ea13ce
5 changed files with 16 additions and 3 deletions

View File

@@ -1591,6 +1591,13 @@ def test_package_collection_infinite_recursion(testdir):
result.stdout.fnmatch_lines("*1 passed*")
def test_package_collection_init_given_as_argument(testdir):
"""Regression test for #3749"""
p = testdir.copy_example("collect/package_init_given_as_arg")
result = testdir.runpytest(p / "pkg" / "__init__.py")
result.stdout.fnmatch_lines("*1 passed*")
def test_package_with_modules(testdir):
"""
.