mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Issue #20549: Use specific asserts in mailbox, smtplib and poplib tests.
This commit is contained in:
commit
1ff23d7542
3 changed files with 30 additions and 29 deletions
|
|
@ -468,7 +468,7 @@ class TestTimeouts(TestCase):
|
|||
serv.close()
|
||||
|
||||
def testTimeoutDefault(self):
|
||||
self.assertTrue(socket.getdefaulttimeout() is None)
|
||||
self.assertIsNone(socket.getdefaulttimeout())
|
||||
socket.setdefaulttimeout(30)
|
||||
try:
|
||||
pop = poplib.POP3(HOST, self.port)
|
||||
|
|
@ -478,13 +478,13 @@ class TestTimeouts(TestCase):
|
|||
pop.sock.close()
|
||||
|
||||
def testTimeoutNone(self):
|
||||
self.assertTrue(socket.getdefaulttimeout() is None)
|
||||
self.assertIsNone(socket.getdefaulttimeout())
|
||||
socket.setdefaulttimeout(30)
|
||||
try:
|
||||
pop = poplib.POP3(HOST, self.port, timeout=None)
|
||||
finally:
|
||||
socket.setdefaulttimeout(None)
|
||||
self.assertTrue(pop.sock.gettimeout() is None)
|
||||
self.assertIsNone(pop.sock.gettimeout())
|
||||
pop.sock.close()
|
||||
|
||||
def testTimeoutValue(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue