(self)
| 746 | |
| 747 | @support.cpython_only |
| 748 | def test_sizeof(self): |
| 749 | MAXFREEBLOCKS = 16 |
| 750 | BLOCKLEN = 64 |
| 751 | basesize = support.calcvobjsize('2P5n%dPP' % MAXFREEBLOCKS) |
| 752 | blocksize = struct.calcsize('P%dPP' % BLOCKLEN) |
| 753 | self.assertEqual(object.__sizeof__(deque()), basesize) |
| 754 | check = self.check_sizeof |
| 755 | check(deque(), basesize + blocksize) |
| 756 | check(deque('a'), basesize + blocksize) |
| 757 | check(deque('a' * (BLOCKLEN - 1)), basesize + blocksize) |
| 758 | check(deque('a' * BLOCKLEN), basesize + 2 * blocksize) |
| 759 | check(deque('a' * (42 * BLOCKLEN)), basesize + 43 * blocksize) |
| 760 | |
| 761 | class TestVariousIteratorArgs(unittest.TestCase): |
| 762 |
nothing calls this directly
no test coverage detected