Skip to content

Commit 8485081

Browse files
committed
Add failing test for missed collection of __init__.py
1 parent 56e6bb0 commit 8485081

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

testing/test_collection.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,15 @@ def test_collect_init_tests(testdir):
957957
"*<Function 'test_foo'>",
958958
]
959959
)
960+
result = testdir.runpytest("./tests", "--collect-only")
961+
result.stdout.fnmatch_lines(
962+
[
963+
"*<Module '__init__.py'>",
964+
"*<Function 'test_init'>",
965+
"*<Module 'test_foo.py'>",
966+
"*<Function 'test_foo'>",
967+
]
968+
)
960969

961970

962971
def test_collect_invalid_signature_message(testdir):

0 commit comments

Comments
 (0)