MCPcopy Index your code
hub / github.com/python/cpython / FakeCompressor

Class FakeCompressor

Lib/test/test_gzip.py:859–866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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:

Callers 1

test_flush_modesMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_flush_modesMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…