Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Unified Diff: Lib/test/test_ftplib.py

Issue 16510: Using appropriate checks in tests
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/test_fnmatch.py ('k') | Lib/test/test_funcattrs.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_ftplib.py Sun Nov 18 20:49:39 2012 -0600
+++ b/Lib/test/test_ftplib.py Mon Nov 19 12:28:22 2012 +0200
@@ -932,7 +932,7 @@
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("localhost")
@@ -944,13 +944,13 @@
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("localhost", timeout=None)
finally:
socket.setdefaulttimeout(None)
- self.assertTrue(ftp.sock.gettimeout() is None)
+ self.assertIsNone(ftp.sock.gettimeout())
self.evt.wait()
ftp.close()
« no previous file with comments | « Lib/test/test_fnmatch.py ('k') | Lib/test/test_funcattrs.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+