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

Method test_with_statement_logout

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

Source from the content-addressed store, hash-verified

1070
1071 @threading_helper.reap_threads
1072 def test_with_statement_logout(self):
1073 # what happens if already logout in the block?
1074 with self.reaped_server(SimpleIMAPHandler) as server:
1075 with self.imap_class(*server.server_address) as imap:
1076 imap.login('user', 'pass')
1077 self.assertEqual(server.logged, 'user')
1078 imap.logout()
1079 self.assertIsNone(server.logged)
1080 self.assertIsNone(server.logged)
1081
1082 @threading_helper.reap_threads
1083 @cpython_only

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected