summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_array.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-11-03 21:15:46 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-11-03 21:15:46 (GMT)
commit32e23e739f858fcf47332e437d6c4d4f14b2b697 (patch)
tree80ed9b1174783a948655f5b47c26b70f135a894d /Lib/test/test_array.py
parent68f518ce4a700854d3c9b0fef145b9af79883df9 (diff)
downloadcpython-32e23e739f858fcf47332e437d6c4d4f14b2b697.zip
cpython-32e23e739f858fcf47332e437d6c4d4f14b2b697.tar.gz
cpython-32e23e739f858fcf47332e437d6c4d4f14b2b697.tar.bz2
Issue #18702: All skipped tests now reported as skipped.
Diffstat (limited to 'Lib/test/test_array.py')
-rwxr-xr-xLib/test/test_array.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
index 74dccbf..424a25c 100755
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -9,6 +9,7 @@ from test import test_support
from weakref import proxy
import array, cStringIO
from cPickle import loads, dumps, HIGHEST_PROTOCOL
+import sys
class ArraySubclass(array.array):
pass
@@ -772,15 +773,15 @@ class BaseTest(unittest.TestCase):
s = None
self.assertRaises(ReferenceError, len, p)
+ @unittest.skipUnless(hasattr(sys, 'getrefcount'),
+ 'test needs sys.getrefcount()')
def test_bug_782369(self):
- import sys
- 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))
+ 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))
def test_subclass_with_kwargs(self):
# SF bug #1486663 -- this used to erroneously raise a TypeError