diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-03 21:15:46 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-03 21:15:46 (GMT) |
commit | 32e23e739f858fcf47332e437d6c4d4f14b2b697 (patch) | |
tree | 80ed9b1174783a948655f5b47c26b70f135a894d /Lib/test/test_array.py | |
parent | 68f518ce4a700854d3c9b0fef145b9af79883df9 (diff) | |
download | cpython-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-x | Lib/test/test_array.py | 17 |
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 |