diff options
author | Skip Montanaro <skip@pobox.com> | 2003-08-03 23:30:40 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2003-08-03 23:30:40 (GMT) |
commit | ed9bf12848cd00443a72f7259928a6fb01219243 (patch) | |
tree | 505893c4d5732e4ed10c9858f5d8ee764a8a6ef0 /Lib | |
parent | d5cf0b86df81700d86e8ce4db6181bde8f518955 (diff) | |
download | cpython-ed9bf12848cd00443a72f7259928a6fb01219243.zip cpython-ed9bf12848cd00443a72f7259928a6fb01219243.tar.gz cpython-ed9bf12848cd00443a72f7259928a6fb01219243.tar.bz2 |
protect against test problems with Jython
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/test/test_array.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index b3fd3fe..0331280 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -602,12 +602,13 @@ class BaseTest(unittest.TestCase): def test_bug_782369(self): import sys - for i in range(10): - b = array.array('B', range(64)) - rc = sys.getrefcount(10) - for i in range(10): - b = array.array('B', range(64)) - self.assertEqual(rc, sys.getrefcount(10)) + if hasattr(sys, "getrefcount"): + for i in range(10): + b = array.array('B', range(64)) + rc = sys.getrefcount(10) + for i in range(10): + b = array.array('B', range(64)) + self.assertEqual(rc, sys.getrefcount(10)) class StringTest(BaseTest): |