diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-03 19:31:38 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-03 19:31:38 (GMT) |
commit | 43767638a9590689fd8bcd1fcedd15bbe4660856 (patch) | |
tree | 8e96e92a7d1e7af2a20aaa15c9383e0d570acacc /Lib/test/test_sys.py | |
parent | 7a07cc90c73b5a5587536c2f3fc5c2909b59be39 (diff) | |
download | cpython-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_sys.py')
-rw-r--r-- | Lib/test/test_sys.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 8437745..0565f39 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -293,15 +293,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): |