MCPcopy Index your code
hub / github.com/RustPython/RustPython / FakeCompressor

Class FakeCompressor

Lib/test/test_gzip.py:860–867  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

858 # Make sure the argument to flush is properly passed to the
859 # zlib.compressobj; see issue GH-105808.
860 class FakeCompressor:
861 def __init__(self):
862 self.modes = []
863 def compress(self, data):
864 return b''
865 def flush(self, mode=-1):
866 self.modes.append(mode)
867 return b''
868 b = io.BytesIO()
869 fc = FakeCompressor()
870 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