mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Issue #8248: Add some tests for the bool type. Patch by Gregory Nofi.
This commit is contained in:
parent
7e213255ce
commit
6032c25063
5 changed files with 35 additions and 0 deletions
|
@ -49,6 +49,8 @@ class BaseTestCase(unittest.TestCase):
|
|||
self.assertEqual(-7L.__index__(), -7)
|
||||
self.assertEqual(self.o.__index__(), 4)
|
||||
self.assertEqual(self.n.__index__(), 5)
|
||||
self.assertEqual(True.__index__(), 1)
|
||||
self.assertEqual(False.__index__(), 0)
|
||||
|
||||
def test_subclasses(self):
|
||||
r = range(10)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue