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

Method test_with_statement_logout

Lib/test/test_imaplib.py:541–549  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

539 self.assertIsNone(server.logged)
540
541 def test_with_statement_logout(self):
542 # It is legal to log out explicitly inside the with block
543 _, server = self._setup(SimpleIMAPHandler, connect=False)
544 with self.imap_class(*server.server_address) as imap:
545 imap.login('user', 'pass')
546 self.assertEqual(server.logged, 'user')
547 imap.logout()
548 self.assertIsNone(server.logged)
549 self.assertIsNone(server.logged)
550
551 # command tests
552

Callers

nothing calls this directly

Calls 5

_setupMethod · 0.95
logoutMethod · 0.80
assertIsNoneMethod · 0.80
loginMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected