diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-08 13:06:43 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-08 13:06:43 (GMT) |
commit | 1ff23d7542862935fc3fbddb1785fcebfd17e8b2 (patch) | |
tree | 4894e01ecfad7a019d1a3167f4918c7805b3b400 /Lib/test/test_smtplib.py | |
parent | d3e1207191dcb84a58706a5101177f36c09c5681 (diff) | |
parent | 578c6777aad7a9c3d7ffe6b8726d8c3779cccbeb (diff) | |
download | cpython-1ff23d7542862935fc3fbddb1785fcebfd17e8b2.zip cpython-1ff23d7542862935fc3fbddb1785fcebfd17e8b2.tar.gz cpython-1ff23d7542862935fc3fbddb1785fcebfd17e8b2.tar.bz2 |
Issue #20549: Use specific asserts in mailbox, smtplib and poplib tests.
Diffstat (limited to 'Lib/test/test_smtplib.py')
-rw-r--r-- | Lib/test/test_smtplib.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py index e6f39de..39bf7ae 100644 --- a/Lib/test/test_smtplib.py +++ b/Lib/test/test_smtplib.py @@ -96,7 +96,7 @@ class GeneralTests(unittest.TestCase): def testTimeoutDefault(self): mock_socket.reply_with(b"220 Hola mundo") - self.assertTrue(mock_socket.getdefaulttimeout() is None) + self.assertIsNone(mock_socket.getdefaulttimeout()) mock_socket.setdefaulttimeout(30) self.assertEqual(mock_socket.getdefaulttimeout(), 30) try: @@ -108,13 +108,13 @@ class GeneralTests(unittest.TestCase): def testTimeoutNone(self): mock_socket.reply_with(b"220 Hola mundo") - self.assertTrue(socket.getdefaulttimeout() is None) + self.assertIsNone(socket.getdefaulttimeout()) socket.setdefaulttimeout(30) try: smtp = smtplib.SMTP(HOST, self.port, timeout=None) finally: socket.setdefaulttimeout(None) - self.assertTrue(smtp.sock.gettimeout() is None) + self.assertIsNone(smtp.sock.gettimeout()) smtp.close() def testTimeoutValue(self): |