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

Method test_initialize_with_binary_file

Lib/test/test_mailbox.py:1588–1595  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1586 self._check_sample(msg)
1587
1588 def test_initialize_with_binary_file(self):
1589 # Initialize based on contents of binary file
1590 with open(self._path, 'wb+') as f:
1591 f.write(_bytes_sample_message)
1592 f.seek(0)
1593 msg = self._factory(f)
1594 self._post_initialize_hook(msg)
1595 self._check_sample(msg)
1596
1597 def test_initialize_with_nothing(self):
1598 # Initialize without arguments

Callers

nothing calls this directly

Calls 6

_post_initialize_hookMethod · 0.95
_factoryMethod · 0.80
_check_sampleMethod · 0.80
openFunction · 0.50
writeMethod · 0.45
seekMethod · 0.45

Tested by

no test coverage detected