Commit ff8d02a 1 parent bb77fc4 commit ff8d02a Copy full SHA for ff8d02a
File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -15,13 +15,27 @@ def test_non_recursive_exclude(simple_filter: Filter):
15
15
simple_filter .AddExclude ("*.py" )
16
16
assert not simple_filter .CheckFileInclusion ("hello.py" )
17
17
assert simple_filter .CheckFileInclusion ("SomeDir/hello.py" )
18
+ assert simple_filter .CheckFileInclusion ("ParentDir/SomeDir/hello.py" )
19
+
20
+ simple_filter .AddExclude ("*/*.py" )
21
+ assert not simple_filter .CheckFileInclusion ("SomeDir/hello.py" )
22
+ assert simple_filter .CheckFileInclusion ("ParentDir/SomeDir/hello.py" )
18
23
19
24
20
25
@pytest .mark .skipif (sys .version_info < (3 , 13 ), reason = "Needs new glob features from 3.13" )
21
26
def test_recursive_exclude (simple_filter : Filter ):
22
27
simple_filter .AddExclude ("**/*.py" )
23
28
assert not simple_filter .CheckFileInclusion ("hello.py" )
24
29
assert not simple_filter .CheckFileInclusion ("SomeDir/hello.py" )
30
+ assert not simple_filter .CheckFileInclusion ("ParentDir/SomeDir/hello.py" )
31
+
32
+
33
+ @pytest .mark .skipif (sys .version_info < (3 , 13 ), reason = "Needs new glob features from 3.13" )
34
+ def test_mix_exclude (simple_filter : Filter ):
35
+ simple_filter .AddExclude ("test/**/*.py" )
36
+ assert simple_filter .CheckFileInclusion ("hello.py" )
37
+ assert not simple_filter .CheckFileInclusion ("test/hello.py" )
38
+ assert not simple_filter .CheckFileInclusion ("test/SomeDir/hello.py" )
25
39
26
40
27
41
def test_prefix_match (simple_filter : Filter ):
You can’t perform that action at this time.
0 commit comments