diff options
author | Guido van Rossum <guido@python.org> | 2007-07-11 12:20:59 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-07-11 12:20:59 (GMT) |
commit | e61fd5b5ed9d677da2f3349078d7f66f707199de (patch) | |
tree | e28a7630ed3c285eabc7631f4276a2b06e74682b /Lib/test/test_unary.py | |
parent | c9b9de17976a4832f505309b1096f9a7582c7be9 (diff) | |
download | cpython-e61fd5b5ed9d677da2f3349078d7f66f707199de.zip cpython-e61fd5b5ed9d677da2f3349078d7f66f707199de.tar.gz cpython-e61fd5b5ed9d677da2f3349078d7f66f707199de.tar.bz2 |
Patch by Christian Heimes to change self.assert_(x == y) into
self.assertEqual(x, y). (Christian used self.failUnlessEqual(),
but the double negative makes it hard to grok, so I changed it.)
Diffstat (limited to 'Lib/test/test_unary.py')
-rw-r--r-- | Lib/test/test_unary.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/test/test_unary.py b/Lib/test/test_unary.py index d8e86a9..dbefe62 100644 --- a/Lib/test/test_unary.py +++ b/Lib/test/test_unary.py @@ -7,24 +7,24 @@ class UnaryOpTestCase(unittest.TestCase): def test_negative(self): self.assert_(-2 == 0 - 2) - self.assert_(-0 == 0) - self.assert_(--2 == 2) + self.assertEqual(-0, 0) + self.assertEqual(--2, 2) self.assert_(-2 == 0 - 2) self.assert_(-2.0 == 0 - 2.0) self.assert_(-2j == 0 - 2j) def test_positive(self): - self.assert_(+2 == 2) - self.assert_(+0 == 0) - self.assert_(++2 == 2) - self.assert_(+2 == 2) - self.assert_(+2.0 == 2.0) - self.assert_(+2j == 2j) + self.assertEqual(+2, 2) + self.assertEqual(+0, 0) + self.assertEqual(++2, 2) + self.assertEqual(+2, 2) + self.assertEqual(+2.0, 2.0) + self.assertEqual(+2j, 2j) def test_invert(self): self.assert_(-2 == 0 - 2) - self.assert_(-0 == 0) - self.assert_(--2 == 2) + self.assertEqual(-0, 0) + self.assertEqual(--2, 2) self.assert_(-2 == 0 - 2) def test_no_overflow(self): |