diff options
author | Yesung(Isaac) Lee <yy0221ss@gmail.com> | 2022-12-11 23:44:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-11 23:44:29 (GMT) |
commit | 54289f85b2af1ecf046089ddf535dda1bdf6af24 (patch) | |
tree | 1399c50a7b838d4c14f0cd05d5d8b3cf25bcc3fc /Lib/test/test_unary.py | |
parent | 868bab0fdc514cfa70ce97e484a689aee8cb5a36 (diff) | |
download | cpython-54289f85b2af1ecf046089ddf535dda1bdf6af24.zip cpython-54289f85b2af1ecf046089ddf535dda1bdf6af24.tar.gz cpython-54289f85b2af1ecf046089ddf535dda1bdf6af24.tar.bz2 |
gh-99688: Fix outdated tests in test_unary (#99712)
* Remove duplicates from "L" suffix removal
* test_invert now tests `~`.
Diffstat (limited to 'Lib/test/test_unary.py')
-rw-r--r-- | Lib/test/test_unary.py | 9 |
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 |