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

Method test_mode

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

Source from the content-addressed store, hash-verified

320 f.write(b'GZ\n')
321
322 def test_mode(self):
323 self.test_write()
324 with gzip.GzipFile(self.filename, 'r') as f:
325 self.assertEqual(f.myfileobj.mode, 'rb')
326 os_helper.unlink(self.filename)
327 with gzip.GzipFile(self.filename, 'x') as f:
328 self.assertEqual(f.myfileobj.mode, 'xb')
329
330 def test_1647484(self):
331 for mode in ('wb', 'rb'):

Callers

nothing calls this directly

Calls 3

test_writeMethod · 0.95
assertEqualMethod · 0.45
unlinkMethod · 0.45

Tested by

no test coverage detected