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

Method test_with_statement

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

Source from the content-addressed store, hash-verified

539 client = self.imap_class("localhost", addr, timeout=0.001)
540
541 def test_with_statement(self):
542 _, server = self._setup(SimpleIMAPHandler, connect=False)
543 with self.imap_class(*server.server_address) as imap:
544 imap.login('user', 'pass')
545 self.assertEqual(server.logged, 'user')
546 self.assertIsNone(server.logged)
547
548 def test_with_statement_logout(self):
549 # It is legal to log out explicitly inside the with block

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected