Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_sys.py @ 86895:1feeeb8992f8 3.3
Issue #18702: All skipped tests now reported as skipped.
| author | Serhiy Storchaka <storchaka@gmail.com> |
|---|---|
| date | Sun, 03 Nov 2013 21:31:18 +0200 |
| parents | 4d62a62ba44d |
| children | a699550bc73b |
line wrap: on
line diff
--- a/Lib/test/test_sys.py Sun Nov 03 18:27:40 2013 +0000 +++ b/Lib/test/test_sys.py Sun Nov 03 21:31:18 2013 +0200 @@ -291,15 +291,16 @@ 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):
