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

Method test_with_statement

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

Source from the content-addressed store, hash-verified

1062
1063 @threading_helper.reap_threads
1064 def test_with_statement(self):
1065 with self.reaped_server(SimpleIMAPHandler) as server:
1066 with self.imap_class(*server.server_address) as imap:
1067 imap.login('user', 'pass')
1068 self.assertEqual(server.logged, 'user')
1069 self.assertIsNone(server.logged)
1070
1071 @threading_helper.reap_threads
1072 def test_with_statement_logout(self):

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected