test_package_ordering: Collect *.py, but keep a mix of case for filenames. The test doesn't make sense for Windows, because of its case-insensitivity.
This commit is contained in:
parent
f0226e9329
commit
8cf0e46bbf
|
@ -1,2 +1,2 @@
|
|||
Fixed an issue where teardown of fixtures of consecutive sub-packages were executed once, at the end of the outer
|
||||
package.
|
||||
package.
|
||||
|
|
|
@ -1 +1 @@
|
|||
Fixes double collection of tests within packages when the filename starts with a capital letter.
|
||||
Fixes double collection of tests within packages when the filename starts with a capital letter.
|
||||
|
|
|
@ -1630,21 +1630,20 @@ def test_package_ordering(testdir):
|
|||
"""
|
||||
.
|
||||
└── root
|
||||
├── check_root.py
|
||||
├── Test_root.py
|
||||
├── __init__.py
|
||||
├── sub1
|
||||
│ ├── check_sub1.py
|
||||
│ ├── Test_sub1.py
|
||||
│ └── __init__.py
|
||||
└── sub2
|
||||
└── test
|
||||
├── check_sub2.py
|
||||
└── test_in_sub2.py
|
||||
└── test_sub2.py
|
||||
|
||||
"""
|
||||
testdir.makeini(
|
||||
"""
|
||||
[pytest]
|
||||
python_files=check_*.py
|
||||
python_files=*.py
|
||||
"""
|
||||
)
|
||||
root = testdir.mkpydir("root")
|
||||
|
@ -1653,10 +1652,9 @@ def test_package_ordering(testdir):
|
|||
sub2 = root.mkdir("sub2")
|
||||
sub2_test = sub2.mkdir("sub2")
|
||||
|
||||
root.join("check_root.py").write("def test_1(): pass")
|
||||
sub1.join("check_sub1.py").write("def test_2(): pass")
|
||||
sub2_test.join("check_sub2.py").write("def test_3(): pass")
|
||||
sub2_test.join("test_in_sub2.py").write("def test_4(): pass")
|
||||
root.join("Test_root.py").write("def test_1(): pass")
|
||||
sub1.join("Test_sub1.py").write("def test_2(): pass")
|
||||
sub2_test.join("test_sub2.py").write("def test_3(): pass")
|
||||
|
||||
# Execute from .
|
||||
result = testdir.runpytest("-v", "-s")
|
||||
|
|
Loading…
Reference in New Issue