summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-11-03 19:31:18 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-11-03 19:31:18 (GMT)
commit79080686274f87d7110c5150ee6c31de5dc3c5db (patch)
tree0b5701193b462ad2e923148c2d5ee23ee895b270 /Lib/test/test_sys.py
parent834856aca9ebd28d314a8d963b193f9d8176a956 (diff)
downloadcpython-79080686274f87d7110c5150ee6c31de5dc3c5db.zip
cpython-79080686274f87d7110c5150ee6c31de5dc3c5db.tar.gz
cpython-79080686274f87d7110c5150ee6c31de5dc3c5db.tar.bz2
Issue #18702: All skipped tests now reported as skipped.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index bc4c0ad..acf6d36 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -291,15 +291,16 @@ class SysModuleTest(unittest.TestCase):
def test_call_tracing(self):
self.assertRaises(TypeError, sys.call_tracing, type, 2)
+ @unittest.skipUnless(hasattr(sys, "setdlopenflags"),
+ 'test needs sys.setdlopenflags()')
def test_dlopenflags(self):
- if hasattr(sys, "setdlopenflags"):
- self.assertTrue(hasattr(sys, "getdlopenflags"))
- self.assertRaises(TypeError, sys.getdlopenflags, 42)
- oldflags = sys.getdlopenflags()
- self.assertRaises(TypeError, sys.setdlopenflags)
- sys.setdlopenflags(oldflags+1)
- self.assertEqual(sys.getdlopenflags(), oldflags+1)
- sys.setdlopenflags(oldflags)
+ self.assertTrue(hasattr(sys, "getdlopenflags"))
+ self.assertRaises(TypeError, sys.getdlopenflags, 42)
+ oldflags = sys.getdlopenflags()
+ self.assertRaises(TypeError, sys.setdlopenflags)
+ sys.setdlopenflags(oldflags+1)
+ self.assertEqual(sys.getdlopenflags(), oldflags+1)
+ sys.setdlopenflags(oldflags)
@test.support.refcount_test
def test_refcount(self):