@@ -98,7 +98,7 @@ def test_get_matching_files_all(rootdir):
98
98
99
99
100
100
def test_get_matching_files_all_exclude_single (rootdir ):
101
- files = get_matching_files (rootdir / "test-root" , ["**.html" ])
101
+ files = get_matching_files (rootdir / "test-root" , exclude_patterns = ["**.html" ])
102
102
assert sorted (files ) == [
103
103
'Makefile' , 'autodoc.txt' , 'autodoc_target.py' , 'bom.txt' , 'conf.py' ,
104
104
'extapi.txt' , 'extensions.txt' , 'file_with_special_#_chars.xyz' , 'footnote.txt' ,
@@ -112,7 +112,7 @@ def test_get_matching_files_all_exclude_single(rootdir):
112
112
113
113
114
114
def test_get_matching_files_all_exclude_multiple (rootdir ):
115
- files = get_matching_files (rootdir / "test-root" , ["**.html" , "**.inc" ])
115
+ files = get_matching_files (rootdir / "test-root" , exclude_patterns = ["**.html" , "**.inc" ])
116
116
assert sorted (files ) == [
117
117
'Makefile' , 'autodoc.txt' , 'autodoc_target.py' , 'bom.txt' , 'conf.py' ,
118
118
'extapi.txt' , 'extensions.txt' , 'file_with_special_#_chars.xyz' , 'footnote.txt' ,
@@ -125,7 +125,7 @@ def test_get_matching_files_all_exclude_multiple(rootdir):
125
125
126
126
127
127
def test_get_matching_files_all_exclude_nonexistent (rootdir ):
128
- files = get_matching_files (rootdir / "test-root" , ["halibut/**" ])
128
+ files = get_matching_files (rootdir / "test-root" , exclude_patterns = ["halibut/**" ])
129
129
assert sorted (files ) == [
130
130
'Makefile' , '_templates/contentssb.html' , '_templates/customsb.html' ,
131
131
'_templates/layout.html' , 'autodoc.txt' , 'autodoc_target.py' , 'bom.txt' , 'conf.py' ,
@@ -140,35 +140,35 @@ def test_get_matching_files_all_exclude_nonexistent(rootdir):
140
140
141
141
142
142
def test_get_matching_files_all_include_single (rootdir ):
143
- files = get_matching_files (rootdir / "test-root" , [], ["subdir/**" ])
143
+ files = get_matching_files (rootdir / "test-root" , include_patterns = ["subdir/**" ])
144
144
assert sorted (files ) == [
145
145
'subdir/excluded.txt' , 'subdir/images.txt' , 'subdir/img.png' , 'subdir/include.inc' ,
146
146
'subdir/includes.txt' , 'subdir/simg.png' ,
147
147
]
148
148
149
149
150
150
def test_get_matching_files_all_include_multiple (rootdir ):
151
- files = get_matching_files (rootdir / "test-root" , [], ["special/**" , "subdir/**" ])
151
+ files = get_matching_files (rootdir / "test-root" , include_patterns = ["special/**" , "subdir/**" ])
152
152
assert sorted (files ) == [
153
153
'special/api.h' , 'special/code.py' , 'subdir/excluded.txt' , 'subdir/images.txt' ,
154
154
'subdir/img.png' , 'subdir/include.inc' , 'subdir/includes.txt' , 'subdir/simg.png' ,
155
155
]
156
156
157
157
158
158
def test_get_matching_files_all_include_nonexistent (rootdir ):
159
- files = get_matching_files (rootdir / "test-root" , [], ["halibut/**" ])
159
+ files = get_matching_files (rootdir / "test-root" , include_patterns = ["halibut/**" ])
160
160
assert sorted (files ) == []
161
161
162
162
163
163
def test_get_matching_files_all_include_prefix (rootdir ):
164
- files = get_matching_files (rootdir / "test-root" , [], ["autodoc*" ])
164
+ files = get_matching_files (rootdir / "test-root" , include_patterns = ["autodoc*" ])
165
165
assert sorted (files ) == [
166
166
'autodoc.txt' , 'autodoc_target.py' ,
167
167
]
168
168
169
169
170
170
def test_get_matching_files_all_include_question_mark (rootdir ):
171
- files = get_matching_files (rootdir / "test-root" , [], ["img.???" ])
171
+ files = get_matching_files (rootdir / "test-root" , include_patterns = ["img.???" ])
172
172
assert sorted (files ) == [
173
173
'img.gif' , 'img.pdf' , 'img.png' ,
174
174
]
0 commit comments