(self)
| 3910 | |
| 3911 | class CodecCacheTest(unittest.TestCase): |
| 3912 | def test_cache_bounded(self): |
| 3913 | for i in range(encodings._MAXCACHE + 1000): |
| 3914 | try: |
| 3915 | b'x'.decode(f'nonexist_{i}') |
| 3916 | except LookupError: |
| 3917 | pass |
| 3918 | |
| 3919 | self.assertLessEqual(len(encodings._cache), encodings._MAXCACHE) |
| 3920 | |
| 3921 | |
| 3922 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected