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

Unified Diff: Lib/test/test_complex.py

Issue 16510: Using appropriate checks in tests
Patch Set: Created 5 years, 10 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_compile.py ('k') | Lib/test/test_concurrent_futures.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_complex.py Fri Feb 07 17:53:13 2014 +0100
+++ b/Lib/test/test_complex.py Fri Feb 07 23:40:05 2014 +0200
@@ -203,7 +203,7 @@
def test_boolcontext(self):
for i in range(100):
self.assertTrue(complex(random() + 1e-6, random() + 1e-6))
- self.assertTrue(not complex(0.0, 0.0))
+ self.assertFalse(complex(0.0, 0.0))
def test_conjugate(self):
self.assertClose(complex(5.3, 9.8).conjugate(), 5.3-9.8j)
@@ -288,7 +288,7 @@
self.assertEqual(split_zeros(complex(-0., 1.).real), split_zeros(-0.))
c = 3.14 + 1j
- self.assertTrue(complex(c) is c)
+ self.assertIs(complex(c), c)
del c
self.assertRaises(TypeError, complex, "1", "1")
« no previous file with comments | « Lib/test/test_compile.py ('k') | Lib/test/test_concurrent_futures.py » ('j') | no next file with comments »

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