@@ -167,7 +167,7 @@ def test_tree_matcher(self):
167
167
files .canonical_filename ("sub4/file5.py" ),
168
168
files .canonical_filename ("SUB5/file6.py" ),
169
169
]
170
- tm = TreeMatcher (trees )
170
+ tm = TreeMatcher (trees , "test" )
171
171
assert tm .info () == trees
172
172
for filepath , matches in matches_to_try :
173
173
self .assertMatches (tm , filepath , matches )
@@ -190,7 +190,7 @@ def test_module_matcher(self):
190
190
('yourmain' , False ),
191
191
]
192
192
modules = ['test' , 'py.test' , 'mymain' ]
193
- mm = ModuleMatcher (modules )
193
+ mm = ModuleMatcher (modules , "test" )
194
194
assert mm .info () == modules
195
195
for modulename , matches in matches_to_try :
196
196
assert mm .match (modulename ) == matches , modulename
@@ -203,23 +203,23 @@ def test_fnmatch_matcher(self):
203
203
(self .make_file ("sub3/file4.py" ), True ),
204
204
(self .make_file ("sub3/file5.c" ), False ),
205
205
]
206
- fnm = FnmatchMatcher (["*.py" , "*/sub2/*" ])
206
+ fnm = FnmatchMatcher (["*.py" , "*/sub2/*" ], "test" )
207
207
assert fnm .info () == ["*.py" , "*/sub2/*" ]
208
208
for filepath , matches in matches_to_try :
209
209
self .assertMatches (fnm , filepath , matches )
210
210
211
211
def test_fnmatch_matcher_overload (self ):
212
- fnm = FnmatchMatcher (["*x%03d*.txt" % i for i in range (500 )])
212
+ fnm = FnmatchMatcher (["*x%03d*.txt" % i for i in range (500 )], "test" )
213
213
self .assertMatches (fnm , "x007foo.txt" , True )
214
214
self .assertMatches (fnm , "x123foo.txt" , True )
215
215
self .assertMatches (fnm , "x798bar.txt" , False )
216
216
217
217
def test_fnmatch_windows_paths (self ):
218
218
# We should be able to match Windows paths even if we are running on
219
219
# a non-Windows OS.
220
- fnm = FnmatchMatcher (["*/foo.py" ])
220
+ fnm = FnmatchMatcher (["*/foo.py" ], "test" )
221
221
self .assertMatches (fnm , r"dir\foo.py" , True )
222
- fnm = FnmatchMatcher ([r"*\foo.py" ])
222
+ fnm = FnmatchMatcher ([r"*\foo.py" ], "test" )
223
223
self .assertMatches (fnm , r"dir\foo.py" , True )
224
224
225
225
0 commit comments