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

Unified Diff: Lib/test/test_xmlrpc.py

Issue 16510: Using appropriate checks in tests
Patch Set: Created 5 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_xdrlib.py ('k') | Lib/test/test_zlib.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_xmlrpc.py Fri Feb 07 17:53:13 2014 +0100
+++ b/Lib/test/test_xmlrpc.py Fri Feb 07 23:40:05 2014 +0200
@@ -958,8 +958,8 @@
# ignore failures due to non-blocking socket 'unavailable' errors
if not is_unavailable_exception(e) and hasattr(e, "headers"):
# The two server-side error headers shouldn't be sent back in this case
- self.assertTrue(e.headers.get("X-exception") is None)
- self.assertTrue(e.headers.get("X-traceback") is None)
+ self.assertIsNone(e.headers.get("X-exception"))
+ self.assertIsNone(e.headers.get("X-traceback"))
else:
self.fail('ProtocolError not raised')
@@ -980,7 +980,7 @@
# We should get error info in the response
expected_err = "invalid literal for int() with base 10: 'I am broken'"
self.assertEqual(e.headers.get("X-exception"), expected_err)
- self.assertTrue(e.headers.get("X-traceback") is not None)
+ self.assertIsNotNone(e.headers.get("X-traceback"))
else:
self.fail('ProtocolError not raised')
« no previous file with comments | « Lib/test/test_xdrlib.py ('k') | Lib/test/test_zlib.py » ('j') | no next file with comments »

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