@@ -950,55 +950,55 @@ def test_collect_init_tests(testdir):
950
950
[
951
951
"collected 2 items" ,
952
952
"<Package *" ,
953
- " <Module ' __init__.py' >" ,
954
- " <Function ' test_init' >" ,
955
- " <Module ' test_foo.py' >" ,
956
- " <Function ' test_foo' >" ,
953
+ " <Module __init__.py>" ,
954
+ " <Function test_init>" ,
955
+ " <Module test_foo.py>" ,
956
+ " <Function test_foo>" ,
957
957
]
958
958
)
959
959
result = testdir .runpytest ("./tests" , "--collect-only" )
960
960
result .stdout .fnmatch_lines (
961
961
[
962
962
"collected 2 items" ,
963
963
"<Package *" ,
964
- " <Module ' __init__.py' >" ,
965
- " <Function ' test_init' >" ,
966
- " <Module ' test_foo.py' >" ,
967
- " <Function ' test_foo' >" ,
964
+ " <Module __init__.py>" ,
965
+ " <Function test_init>" ,
966
+ " <Module test_foo.py>" ,
967
+ " <Function test_foo>" ,
968
968
]
969
969
)
970
970
# Ignores duplicates with "." and pkginit (#4310).
971
971
result = testdir .runpytest ("./tests" , "." , "--collect-only" )
972
972
result .stdout .fnmatch_lines (
973
973
[
974
974
"collected 2 items" ,
975
- "<Package */tests' >" ,
976
- " <Module ' __init__.py' >" ,
977
- " <Function ' test_init' >" ,
978
- " <Module ' test_foo.py' >" ,
979
- " <Function ' test_foo' >" ,
975
+ "<Package */tests>" ,
976
+ " <Module __init__.py>" ,
977
+ " <Function test_init>" ,
978
+ " <Module test_foo.py>" ,
979
+ " <Function test_foo>" ,
980
980
]
981
981
)
982
982
# Same as before, but different order.
983
983
result = testdir .runpytest ("." , "tests" , "--collect-only" )
984
984
result .stdout .fnmatch_lines (
985
985
[
986
986
"collected 2 items" ,
987
- "<Package */tests' >" ,
988
- " <Module ' __init__.py' >" ,
989
- " <Function ' test_init' >" ,
990
- " <Module ' test_foo.py' >" ,
991
- " <Function ' test_foo' >" ,
987
+ "<Package */tests>" ,
988
+ " <Module __init__.py>" ,
989
+ " <Function test_init>" ,
990
+ " <Module test_foo.py>" ,
991
+ " <Function test_foo>" ,
992
992
]
993
993
)
994
994
result = testdir .runpytest ("./tests/test_foo.py" , "--collect-only" )
995
995
result .stdout .fnmatch_lines (
996
- ["<Package */tests' >" , " <Module ' test_foo.py' >" , " <Function ' test_foo' >" ]
996
+ ["<Package */tests>" , " <Module test_foo.py>" , " <Function test_foo>" ]
997
997
)
998
998
assert "test_init" not in result .stdout .str ()
999
999
result = testdir .runpytest ("./tests/__init__.py" , "--collect-only" )
1000
1000
result .stdout .fnmatch_lines (
1001
- ["<Package */tests' >" , " <Module ' __init__.py' >" , " <Function ' test_init' >" ]
1001
+ ["<Package */tests>" , " <Module __init__.py>" , " <Function test_init>" ]
1002
1002
)
1003
1003
assert "test_foo" not in result .stdout .str ()
1004
1004
0 commit comments