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

Method test_initialize_with_file

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

Source from the content-addressed store, hash-verified

1562 self._check_sample(msg)
1563
1564 def test_initialize_with_file(self):
1565 # Initialize based on contents of file
1566 with open(self._path, 'w+', encoding='utf-8') as f:
1567 f.write(_sample_message)
1568 f.seek(0)
1569 msg = self._factory(f)
1570 self._post_initialize_hook(msg)
1571 self._check_sample(msg)
1572
1573 def test_initialize_with_binary_file(self):
1574 # Initialize based on contents of binary file

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