| 857 | # Make sure the argument to flush is properly passed to the |
| 858 | # zlib.compressobj; see issue GH-105808. |
| 859 | class FakeCompressor: |
| 860 | def __init__(self): |
| 861 | self.modes = [] |
| 862 | def compress(self, data): |
| 863 | return b'' |
| 864 | def flush(self, mode=-1): |
| 865 | self.modes.append(mode) |
| 866 | return b'' |
| 867 | b = io.BytesIO() |
| 868 | fc = FakeCompressor() |
| 869 | with gzip.GzipFile(fileobj=b, mode='w') as f: |
no outgoing calls
searching dependent graphs…