summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unary.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_unary.py')
-rw-r--r--Lib/test/test_unary.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/test/test_unary.py b/Lib/test/test_unary.py
index c3c17cc..a45fbf6 100644
--- a/Lib/test/test_unary.py
+++ b/Lib/test/test_unary.py
@@ -8,7 +8,6 @@ class UnaryOpTestCase(unittest.TestCase):
self.assertTrue(-2 == 0 - 2)
self.assertEqual(-0, 0)
self.assertEqual(--2, 2)
- self.assertTrue(-2 == 0 - 2)
self.assertTrue(-2.0 == 0 - 2.0)
self.assertTrue(-2j == 0 - 2j)
@@ -16,15 +15,13 @@ class UnaryOpTestCase(unittest.TestCase):
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.assertTrue(-2 == 0 - 2)
- self.assertEqual(-0, 0)
- self.assertEqual(--2, 2)
- self.assertTrue(-2 == 0 - 2)
+ self.assertTrue(~2 == -(2+1))
+ self.assertEqual(~0, -1)
+ self.assertEqual(~~2, 2)
def test_no_overflow(self):
nines = "9" * 32