]> granicus.if.org Git - python/commitdiff
Relax test when WITH_PYMALLOC is false or undefined.
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 18 Dec 2012 18:50:58 +0000 (19:50 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 18 Dec 2012 18:50:58 +0000 (19:50 +0100)
Lib/test/test_sys.py

index 41f1439741b20692e62d5791945f75ca8be0b02e..b6646876630ca9336919af910b6a4b556d15e60b 100644 (file)
@@ -623,7 +623,10 @@ class SysModuleTest(unittest.TestCase):
         if with_pymalloc:
             self.assertGreater(a, 0)
         else:
-            self.assertEqual(a, 0)
+            # When WITH_PYMALLOC isn't available, we don't know anything
+            # about the underlying implementation: the function might
+            # return 0 or something greater.
+            self.assertGreaterEqual(a, 0)
         try:
             # While we could imagine a Python session where the number of
             # multiple buffer objects would exceed the sharing of references,