Skip to content

Commit 205fd00

Browse files
committed
implement __sizeof__ for SimpleQueue to account for ring-buffer storage
1 parent b2b05ea commit 205fd00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_queue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ def test_simplequeue_sizeof_reflects_buffer_growth(self):
10401040
q.put(object())
10411041
after = sys.getsizeof(q)
10421042
self.assertGreater(after, before)
1043-
ptr = support.calcobjsize(1) - support.calcobjsize(0)
1043+
ptr = support.calcobjsize("P") - support.calcobjsize("")
10441044
self.assertEqual((after - before) % ptr, 0)
10451045

10461046
def test_reentrancy(self):

0 commit comments

Comments
 (0)