summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_array.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-11-03 19:31:38 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-11-03 19:31:38 (GMT)
commit43767638a9590689fd8bcd1fcedd15bbe4660856 (patch)
tree8e96e92a7d1e7af2a20aaa15c9383e0d570acacc /Lib/test/test_array.py
parent7a07cc90c73b5a5587536c2f3fc5c2909b59be39 (diff)
downloadcpython-43767638a9590689fd8bcd1fcedd15bbe4660856.zip
cpython-43767638a9590689fd8bcd1fcedd15bbe4660856.tar.gz
cpython-43767638a9590689fd8bcd1fcedd15bbe4660856.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 a44ee07..a5c4f23 100755
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -11,6 +11,7 @@ import operator
import io
import math
import struct
+import sys
import warnings
import array
@@ -993,15 +994,15 @@ class BaseTest:
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