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

Method test_terminating_newline

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

Source from the content-addressed store, hash-verified

1289 self.assertFalse((perms & 0o111)) # Execute bits should all be off.
1290
1291 def test_terminating_newline(self):
1292 message = email.message.Message()
1293 message['From'] = 'john@example.com'
1294 message.set_payload('No newline at the end')
1295 i = self._box.add(message)
1296
1297 # A newline should have been appended to the payload
1298 message = self._box.get(i)
1299 self.assertEqual(message.get_payload(), 'No newline at the end\n')
1300
1301 def test_message_separator(self):
1302 # Check there's always a single blank line after each message

Callers

nothing calls this directly

Calls 5

set_payloadMethod · 0.95
get_payloadMethod · 0.95
addMethod · 0.45
getMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected