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

Method test_compression

Lib/test/test_ssl.py:4348–4355  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4346 repr(new_cb_data).encode("us-ascii"))
4347
4348 def test_compression(self):
4349 client_context, server_context, hostname = testing_context()
4350 stats = server_params_test(client_context, server_context,
4351 chatty=True, connectionchatty=True,
4352 sni_name=hostname)
4353 if support.verbose:
4354 sys.stdout.write(" got compression: {!r}\n".format(stats['compression']))
4355 self.assertIn(stats['compression'], { None, 'ZLIB', 'RLE' })
4356
4357 @unittest.skipUnless(hasattr(ssl, 'OP_NO_COMPRESSION'),
4358 "ssl.OP_NO_COMPRESSION needed for this test")

Callers

nothing calls this directly

Calls 5

testing_contextFunction · 0.85
server_params_testFunction · 0.85
assertInMethod · 0.80
writeMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected