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