Commit c8ef2de1 authored by Skip Montanaro's avatar Skip Montanaro

protect against test problems with Jython

parent 55c4a5a1
...@@ -602,12 +602,13 @@ class BaseTest(unittest.TestCase): ...@@ -602,12 +602,13 @@ class BaseTest(unittest.TestCase):
def test_bug_782369(self): def test_bug_782369(self):
import sys import sys
for i in range(10): if hasattr(sys, "getrefcount"):
b = array.array('B', range(64)) for i in range(10):
rc = sys.getrefcount(10) b = array.array('B', range(64))
for i in range(10): rc = sys.getrefcount(10)
b = array.array('B', range(64)) for i in range(10):
self.assertEqual(rc, sys.getrefcount(10)) b = array.array('B', range(64))
self.assertEqual(rc, sys.getrefcount(10))
class StringTest(BaseTest): class StringTest(BaseTest):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment