Add test for __init__.py collection with package directory as argument

This commit is contained in:
Mick Koch 2018-10-31 14:18:12 -04:00
parent d65f300988
commit 70976b04be
1 changed files with 9 additions and 0 deletions

View File

@ -957,6 +957,15 @@ def test_collect_init_tests(testdir):
"*<Function 'test_foo'>",
]
)
result = testdir.runpytest("./tests", "--collect-only")
result.stdout.fnmatch_lines(
[
"*<Module '__init__.py'>",
"*<Function 'test_init'>",
"*<Module 'test_foo.py'>",
"*<Function 'test_foo'>",
]
)
def test_collect_invalid_signature_message(testdir):