summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-02-20 22:56:58 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-02-20 22:56:58 (GMT)
commit4bd4585f8ea9375e69bef03e1a0ca736433bf0bd (patch)
treeb96db0b3913cd656109ba29a783724a2006cd0a9 /Lib
parenta241d0a8a2db3ac1c0bbb61988ed831d605d2814 (diff)
downloadcpython-4bd4585f8ea9375e69bef03e1a0ca736433bf0bd.zip
cpython-4bd4585f8ea9375e69bef03e1a0ca736433bf0bd.tar.gz
cpython-4bd4585f8ea9375e69bef03e1a0ca736433bf0bd.tar.bz2
Merged revisions 78101 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78101 | georg.brandl | 2010-02-08 02:04:54 +0200 (Mon, 08 Feb 2010) | 1 line Fix test_fnmatch. ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_fnmatch.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_fnmatch.py b/Lib/test/test_fnmatch.py
index 3777098..3a55b85 100644
--- a/Lib/test/test_fnmatch.py
+++ b/Lib/test/test_fnmatch.py
@@ -7,15 +7,15 @@ 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.assert_(fnmatch(filename, pattern),
- "expected %r to match pattern %r"
- % (filename, pattern))
+ self.assertTrue(fn(filename, pattern),
+ "expected %r to match pattern %r"
+ % (filename, pattern))
else:
- self.assert_(not fnmatch(filename, pattern),
- "expected %r not to match pattern %r"
- % (filename, pattern))
+ self.assertTrue(not fn(filename, pattern),
+ "expected %r not to match pattern %r"
+ % (filename, pattern))
def test_fnmatch(self):
check = self.check_match
@@ -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():