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

Method test_quit_resets_greeting

Lib/test/test_smtplib.py:1253–1266  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1251 smtp.close()
1252
1253 def test_quit_resets_greeting(self):
1254 smtp = smtplib.SMTP(HOST, self.port,
1255 local_hostname='localhost',
1256 timeout=support.LOOPBACK_TIMEOUT)
1257 code, message = smtp.ehlo()
1258 self.assertEqual(code, 250)
1259 self.assertIn('size', smtp.esmtp_features)
1260 smtp.quit()
1261 self.assertNotIn('size', smtp.esmtp_features)
1262 smtp.connect(HOST, self.port)
1263 self.assertNotIn('size', smtp.esmtp_features)
1264 smtp.ehlo_or_helo_if_needed()
1265 self.assertIn('size', smtp.esmtp_features)
1266 smtp.quit()
1267
1268 def test_with_statement(self):
1269 with smtplib.SMTP(HOST, self.port) as smtp:

Callers

nothing calls this directly

Calls 7

ehloMethod · 0.95
quitMethod · 0.95
connectMethod · 0.95
assertInMethod · 0.80
assertNotInMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected