(self, size)
| 849 | @support.skip_if_pgo_task |
| 850 | @bigmemtest(size=_4G + 100, memuse=2) |
| 851 | def testCompress4G(self, size): |
| 852 | # "Test BZ2Compressor.compress()/flush() with >4GiB input" |
| 853 | bz2c = BZ2Compressor() |
| 854 | data = b"x" * size |
| 855 | try: |
| 856 | compressed = bz2c.compress(data) |
| 857 | compressed += bz2c.flush() |
| 858 | finally: |
| 859 | data = None # Release memory |
| 860 | data = bz2.decompress(compressed) |
| 861 | try: |
| 862 | self.assertEqual(len(data), size) |
| 863 | self.assertEqual(len(data.strip(b"x")), 0) |
| 864 | finally: |
| 865 | data = None |
| 866 | |
| 867 | def testPickle(self): |
| 868 | for proto in range(pickle.HIGHEST_PROTOCOL + 1): |
nothing calls this directly
no test coverage detected