MCPcopy Index your code
hub / github.com/python/cpython / test_sep_in_range

Method test_sep_in_range

Lib/test/test_fnmatch.py:178–203  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

176 check('\t', r'[\t]', False)
177
178 def test_sep_in_range(self):
179 check = self.check_match
180 check('a/b', 'a[.-0]b', not NORMSEP)
181 check('a\\b', 'a[.-0]b', False)
182 check('a\\b', 'a[Z-^]b', not NORMSEP)
183 check('a/b', 'a[Z-^]b', False)
184
185 check('a/b', 'a[/-0]b', not NORMSEP)
186 check(r'a\b', 'a[/-0]b', False)
187 check('a[/-0]b', 'a[/-0]b', False)
188 check(r'a[\-0]b', 'a[/-0]b', False)
189
190 check('a/b', 'a[.-/]b')
191 check(r'a\b', 'a[.-/]b', NORMSEP)
192 check('a[.-/]b', 'a[.-/]b', False)
193 check(r'a[.-\]b', 'a[.-/]b', False)
194
195 check(r'a\b', r'a[\-^]b')
196 check('a/b', r'a[\-^]b', NORMSEP)
197 check(r'a[\-^]b', r'a[\-^]b', False)
198 check('a[/-^]b', r'a[\-^]b', False)
199
200 check(r'a\b', r'a[Z-\]b', not NORMSEP)
201 check('a/b', r'a[Z-\]b', False)
202 check(r'a[Z-\]b', r'a[Z-\]b', False)
203 check('a[Z-/]b', r'a[Z-\]b', False)
204
205 def test_warnings(self):
206 with warnings.catch_warnings():

Callers

nothing calls this directly

Calls 1

checkFunction · 0.70

Tested by

no test coverage detected