(self)
| 318 | # testing sys.setprofile() is done in test_sys_setprofile.py |
| 319 | |
| 320 | def test_switchinterval(self): |
| 321 | self.assertRaises(TypeError, sys.setswitchinterval) |
| 322 | self.assertRaises(TypeError, sys.setswitchinterval, "a") |
| 323 | self.assertRaises(ValueError, sys.setswitchinterval, -1.0) |
| 324 | self.assertRaises(ValueError, sys.setswitchinterval, 0.0) |
| 325 | orig = sys.getswitchinterval() |
| 326 | # sanity check |
| 327 | self.assertTrue(orig < 0.5, orig) |
| 328 | try: |
| 329 | for n in 0.00001, 0.05, 3.0, orig: |
| 330 | sys.setswitchinterval(n) |
| 331 | self.assertAlmostEqual(sys.getswitchinterval(), n) |
| 332 | finally: |
| 333 | sys.setswitchinterval(orig) |
| 334 | |
| 335 | def test_getrecursionlimit(self): |
| 336 | limit = sys.getrecursionlimit() |
nothing calls this directly
no test coverage detected