summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ftplib.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-08 12:51:10 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-08 12:51:10 (GMT)
commitd3e1207191dcb84a58706a5101177f36c09c5681 (patch)
treedd8bafcf64e4b1fa8bdf65f21f44a2d04fc89861 /Lib/test/test_ftplib.py
parent6c9678e1a5651bbaa2bfa31d564f2117033fd494 (diff)
parent25d8aeac7c1e24df79c18f6391b7e42b873d66d8 (diff)
downloadcpython-d3e1207191dcb84a58706a5101177f36c09c5681.zip
cpython-d3e1207191dcb84a58706a5101177f36c09c5681.tar.gz
cpython-d3e1207191dcb84a58706a5101177f36c09c5681.tar.bz2
Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref tests.
Diffstat (limited to 'Lib/test/test_ftplib.py')
-rw-r--r--Lib/test/test_ftplib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
index d0fd92e..a9bf30b 100644
--- a/Lib/test/test_ftplib.py
+++ b/Lib/test/test_ftplib.py
@@ -1001,7 +1001,7 @@ class TestTimeouts(TestCase):
def testTimeoutDefault(self):
# default -- use global socket timeout
- self.assertTrue(socket.getdefaulttimeout() is None)
+ self.assertIsNone(socket.getdefaulttimeout())
socket.setdefaulttimeout(30)
try:
ftp = ftplib.FTP(HOST)
@@ -1013,13 +1013,13 @@ class TestTimeouts(TestCase):
def testTimeoutNone(self):
# no timeout -- do not use global socket timeout
- self.assertTrue(socket.getdefaulttimeout() is None)
+ self.assertIsNone(socket.getdefaulttimeout())
socket.setdefaulttimeout(30)
try:
ftp = ftplib.FTP(HOST, timeout=None)
finally:
socket.setdefaulttimeout(None)
- self.assertTrue(ftp.sock.gettimeout() is None)
+ self.assertIsNone(ftp.sock.gettimeout())
self.evt.wait()
ftp.close()