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

Unified Diff: Lib/test/test_module.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_minidom.py ('k') | Lib/test/_test_multiprocessing.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_module.py Fri Feb 07 17:53:13 2014 +0100
+++ b/Lib/test/test_module.py Fri Feb 07 23:40:05 2014 +0200
@@ -21,7 +21,7 @@
# An uninitialized module has no __dict__ or __name__,
# and __doc__ is None
foo = ModuleType.__new__(ModuleType)
- self.assertTrue(foo.__dict__ is None)
+ self.assertIsNone(foo.__dict__)
self.assertRaises(SystemError, dir, foo)
try:
s = foo.__name__
@@ -74,7 +74,7 @@
self.assertEqual(foo.__dict__,
{"__name__": "foo", "__doc__": "foodoc", "bar": 42,
"__loader__": None, "__package__": None, "__spec__": None})
- self.assertTrue(foo.__dict__ is d)
+ self.assertIs(foo.__dict__, d)
def test_dont_clear_dict(self):
# See issue 7140.
« no previous file with comments | « Lib/test/test_minidom.py ('k') | Lib/test/_test_multiprocessing.py » ('j') | no next file with comments »

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