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

Skip to content

Commit f61dc4c

Browse files
committed
Relax test when WITH_PYMALLOC is false or undefined.
1 parent a9466c6 commit f61dc4c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/test/test_sys.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,10 @@ def test_getallocatedblocks(self):
623623
if with_pymalloc:
624624
self.assertGreater(a, 0)
625625
else:
626-
self.assertEqual(a, 0)
626+
# When WITH_PYMALLOC isn't available, we don't know anything
627+
# about the underlying implementation: the function might
628+
# return 0 or something greater.
629+
self.assertGreaterEqual(a, 0)
627630
try:
628631
# While we could imagine a Python session where the number of
629632
# multiple buffer objects would exceed the sharing of references,

0 commit comments

Comments
 (0)