diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-06-30 23:06:06 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-06-30 23:06:06 (GMT) |
commit | c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9 (patch) | |
tree | 6350dab0b481e6de307dc4e043c6230f463a9ca7 /Lib/test/test_unary.py | |
parent | 98d23f2e065713ccfbc07d9a0b65f737a212bfb5 (diff) | |
download | cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.zip cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.tar.gz cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.tar.bz2 |
convert old fail* assertions to assert*
Diffstat (limited to 'Lib/test/test_unary.py')
-rw-r--r-- | Lib/test/test_unary.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_unary.py b/Lib/test/test_unary.py index 7dd651e..b835564 100644 --- a/Lib/test/test_unary.py +++ b/Lib/test/test_unary.py @@ -6,12 +6,12 @@ from test.support import run_unittest class UnaryOpTestCase(unittest.TestCase): def test_negative(self): - self.assert_(-2 == 0 - 2) + self.assertTrue(-2 == 0 - 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) + self.assertTrue(-2 == 0 - 2) + self.assertTrue(-2.0 == 0 - 2.0) + self.assertTrue(-2j == 0 - 2j) def test_positive(self): self.assertEqual(+2, 2) @@ -22,16 +22,16 @@ class UnaryOpTestCase(unittest.TestCase): self.assertEqual(+2j, 2j) def test_invert(self): - self.assert_(-2 == 0 - 2) + self.assertTrue(-2 == 0 - 2) self.assertEqual(-0, 0) self.assertEqual(--2, 2) - self.assert_(-2 == 0 - 2) + self.assertTrue(-2 == 0 - 2) def test_no_overflow(self): nines = "9" * 32 - self.assert_(eval("+" + nines) == 10**32-1) - self.assert_(eval("-" + nines) == -(10**32-1)) - self.assert_(eval("~" + nines) == ~(10**32-1)) + self.assertTrue(eval("+" + nines) == 10**32-1) + self.assertTrue(eval("-" + nines) == -(10**32-1)) + self.assertTrue(eval("~" + nines) == ~(10**32-1)) def test_negation_of_exponentiation(self): # Make sure '**' does the right thing; these form a |