diff options
author | Georg Brandl <georg@python.org> | 2010-02-08 00:04:54 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-02-08 00:04:54 (GMT) |
commit | 6eedef60a28512007bf6f78072a197530a961b57 (patch) | |
tree | a7b095f27a95c2fdb52f2b6f0ad8a29caebc017b /Lib | |
parent | 841e7f3ae20c87651b8dd94b2ed9cdad39d80ba5 (diff) | |
download | cpython-6eedef60a28512007bf6f78072a197530a961b57.zip cpython-6eedef60a28512007bf6f78072a197530a961b57.tar.gz cpython-6eedef60a28512007bf6f78072a197530a961b57.tar.bz2 |
Fix test_fnmatch.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_fnmatch.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_fnmatch.py b/Lib/test/test_fnmatch.py index aba76ba..6dca85f 100644 --- a/Lib/test/test_fnmatch.py +++ b/Lib/test/test_fnmatch.py @@ -7,13 +7,13 @@ from fnmatch import fnmatch, fnmatchcase class FnmatchTestCase(unittest.TestCase): - def check_match(self, filename, pattern, should_match=1): + def check_match(self, filename, pattern, should_match=1, fn=fnmatch): if should_match: - self.assertTrue(fnmatch(filename, pattern), + self.assertTrue(fn(filename, pattern), "expected %r to match pattern %r" % (filename, pattern)) else: - self.assertTrue(not fnmatch(filename, pattern), + self.assertTrue(not fn(filename, pattern), "expected %r not to match pattern %r" % (filename, pattern)) @@ -46,8 +46,8 @@ class FnmatchTestCase(unittest.TestCase): def test_fnmatchcase(self): check = self.check_match - check('AbC', 'abc', 0) - check('abc', 'AbC', 0) + check('AbC', 'abc', 0, fnmatchcase) + check('abc', 'AbC', 0, fnmatchcase) def test_main(): |