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

Method test_add_from_string

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

Source from the content-addressed store, hash-verified

1165 (unixfrom + _sample_message).split('\n'))
1166
1167 def test_add_from_string(self):
1168 # Add a string starting with 'From ' to the mailbox
1169 key = self._box.add('From foo@bar blah\nFrom: foo\n\n0\n')
1170 self.assertEqual(self._box[key].get_from(), 'foo@bar blah')
1171 self.assertEqual(self._box[key].get_unixfrom(), 'From foo@bar blah')
1172 self.assertEqual(self._box[key].get_payload(), '0\n')
1173
1174 def test_add_from_bytes(self):
1175 # Add a byte string starting with 'From ' to the mailbox

Callers

nothing calls this directly

Calls 5

get_fromMethod · 0.80
get_unixfromMethod · 0.80
get_payloadMethod · 0.80
addMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected