38
37
glob = glob_prefix + glob
39
38
globster = Globster([glob])
40
39
for name in positive:
41
self.failUnless(globster.match(name), repr(
40
self.assertTrue(globster.match(name), repr(
42
41
u'name "%s" does not match glob "%s" (re=%s)' %
43
42
(name, glob, globster._regex_patterns[0][0].pattern)))
44
43
for name in negative:
45
self.failIf(globster.match(name), repr(
44
self.assertFalse(globster.match(name), repr(
46
45
u'name "%s" does match glob "%s" (re=%s)' %
47
46
(name, glob, globster._regex_patterns[0][0].pattern)))
55
54
def test_char_group_digit(self):
56
55
self.assertMatchBasenameAndFullpath([
57
56
# The definition of digit this uses includes arabic digits from
58
# non-latin scripts (arabic, indic, etc.) and subscript/superscript
59
# digits, but neither roman numerals nor vulgar fractions.
57
# non-latin scripts (arabic, indic, etc.) but neither roman
58
# numerals nor vulgar fractions. Some characters such as
59
# subscript/superscript digits may or may not match depending on
60
# the Python version used, see: <http://bugs.python.org/issue6561>
61
[u'0', u'5', u'\u0663', u'\u06f9', u'\u0f21', u'\xb9'],
62
[u'0', u'5', u'\u0663', u'\u06f9', u'\u0f21'],
62
63
[u'T', u'q', u' ', u'\u8336', u'.']),
64
65
[u'T', u'q', u' ', u'\u8336', u'.'],
65
[u'0', u'5', u'\u0663', u'\u06f9', u'\u0f21', u'\xb9']),
66
[u'0', u'5', u'\u0663', u'\u06f9', u'\u0f21']),
68
69
def test_char_group_space(self):