diff options
author | R. David Murray <rdmurray@bitdance.com> | 2010-07-10 14:06:51 +0000 |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2010-07-10 14:06:51 +0000 |
commit | 2ab02f0e16c8ce5242f2cdfb87bb2e98f79f5cfc (patch) | |
tree | 9fd1f3ceb18a05448c7fb4ac33d6127327e1f1d8 /Lib/test/test_fnmatch.py | |
parent | 94f071c7158e8751063a9692bc86a4122b0a717a (diff) | |
download | cpython-git-2ab02f0e16c8ce5242f2cdfb87bb2e98f79f5cfc.tar.gz |
Merged revisions 82766 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
Since 'purge' is an API change, modified it to be _purge for 2.x
and deleted the doc update.
........
r82766 | r.david.murray | 2010-07-10 09:52:13 -0400 (Sat, 10 Jul 2010) | 5 lines
Fix 'refleak' introduced by fnmatch cache purge tests.
This introduces a 'purge' function for the fnmatch module analogous
to the 'purge' function in the re module.
........
Diffstat (limited to 'Lib/test/test_fnmatch.py')
-rw-r--r-- | Lib/test/test_fnmatch.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_fnmatch.py b/Lib/test/test_fnmatch.py index 7f0d51d513..37ec50d71a 100644 --- a/Lib/test/test_fnmatch.py +++ b/Lib/test/test_fnmatch.py @@ -4,9 +4,14 @@ from test import test_support import unittest from fnmatch import fnmatch, fnmatchcase, _MAXCACHE, _cache +from fnmatch import fnmatch, fnmatchcase, _MAXCACHE, _cache, _purge class FnmatchTestCase(unittest.TestCase): + + def tearDown(self): + _purge() + def check_match(self, filename, pattern, should_match=1, fn=fnmatch): if should_match: self.assertTrue(fn(filename, pattern), |