(self)
| 659 | # CRASHES ispositive(NULL) |
| 660 | |
| 661 | def test_long_isnegative(self): |
| 662 | # Test PyLong_IsNegative() |
| 663 | isnegative = _testcapi.pylong_isnegative |
| 664 | self.assertEqual(isnegative(1), 0) |
| 665 | self.assertEqual(isnegative(123), 0) |
| 666 | self.assertEqual(isnegative(-1), 1) |
| 667 | self.assertEqual(isnegative(0), 0) |
| 668 | self.assertEqual(isnegative(True), 0) |
| 669 | self.assertEqual(isnegative(False), 0) |
| 670 | self.assertEqual(isnegative(IntSubclass(-1)), 1) |
| 671 | self.assertRaises(TypeError, isnegative, 1.0) |
| 672 | self.assertRaises(TypeError, isnegative, Index(123)) |
| 673 | |
| 674 | # CRASHES isnegative(NULL) |
| 675 | |
| 676 | def test_long_iszero(self): |
| 677 | # Test PyLong_IsZero() |
nothing calls this directly
no test coverage detected