Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d5cf0b8

Browse files
author
Skip Montanaro
committed
added test for bug 782369
1 parent c1b4154 commit d5cf0b8

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lib/test/test_array.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,15 @@ def test_buffer(self):
600600
b = buffer(a)
601601
self.assertEqual(b[0], a.tostring()[0])
602602

603+
def test_bug_782369(self):
604+
import sys
605+
for i in range(10):
606+
b = array.array('B', range(64))
607+
rc = sys.getrefcount(10)
608+
for i in range(10):
609+
b = array.array('B', range(64))
610+
self.assertEqual(rc, sys.getrefcount(10))
611+
603612
class StringTest(BaseTest):
604613

605614
def test_setitem(self):

0 commit comments

Comments
 (0)