Python fnmatch._MAXCACHE Examples

The following are 5 code examples of fnmatch._MAXCACHE(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module fnmatch , or try the search function .
Example #1
Source File: test_fnmatch.py    From BinderFilter with MIT License 5 votes vote down vote up
def test_cache_clearing(self):
        # check that caches do not grow too large
        # http://bugs.python.org/issue7846

        # string pattern cache
        for i in range(_MAXCACHE + 1):
            fnmatch('foo', '?' * i)

        self.assertLessEqual(len(_cache), _MAXCACHE) 
Example #2
Source File: test_fnmatch.py    From oss-ftp with MIT License 5 votes vote down vote up
def test_cache_clearing(self):
        # check that caches do not grow too large
        # http://bugs.python.org/issue7846

        # string pattern cache
        for i in range(_MAXCACHE + 1):
            fnmatch('foo', '?' * i)

        self.assertLessEqual(len(_cache), _MAXCACHE) 
Example #3
Source File: test_fnmatch.py    From gcblue with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def test_cache_clearing(self):
        # check that caches do not grow too large
        # http://bugs.python.org/issue7846

        # string pattern cache
        for i in range(_MAXCACHE + 1):
            fnmatch('foo', '?' * i)

        self.assertLessEqual(len(_cache), _MAXCACHE) 
Example #4
Source File: test_fnmatch.py    From CTFCrackTools-V2 with GNU General Public License v3.0 5 votes vote down vote up
def test_cache_clearing(self):
        # check that caches do not grow too large
        # http://bugs.python.org/issue7846

        # string pattern cache
        for i in range(_MAXCACHE + 1):
            fnmatch('foo', '?' * i)

        self.assertLessEqual(len(_cache), _MAXCACHE) 
Example #5
Source File: test_fnmatch.py    From CTFCrackTools with GNU General Public License v3.0 5 votes vote down vote up
def test_cache_clearing(self):
        # check that caches do not grow too large
        # http://bugs.python.org/issue7846

        # string pattern cache
        for i in range(_MAXCACHE + 1):
            fnmatch('foo', '?' * i)

        self.assertLessEqual(len(_cache), _MAXCACHE)