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

Method test_decompress_stdin_stdout

Lib/test/test_gzip.py:1065–1075  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1063
1064 @requires_subprocess()
1065 def test_decompress_stdin_stdout(self):
1066 with io.BytesIO() as bytes_io:
1067 with gzip.GzipFile(fileobj=bytes_io, mode='wb') as gzip_file:
1068 gzip_file.write(self.data)
1069
1070 args = sys.executable, '-m', 'gzip', '-d'
1071 with Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE) as proc:
1072 out, err = proc.communicate(bytes_io.getvalue())
1073
1074 self.assertEqual(err, b'')
1075 self.assertEqual(out, self.data)
1076
1077 @create_and_remove_directory(TEMPDIR)
1078 def test_decompress_infile_outfile(self):

Callers

nothing calls this directly

Calls 5

PopenClass · 0.90
writeMethod · 0.45
communicateMethod · 0.45
getvalueMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected