mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
New function sys.getcheckinterval(), to complement setcheckinterval().
This commit is contained in:
parent
d6640d4bd0
commit
e5e065b669
4 changed files with 24 additions and 2 deletions
|
@ -172,8 +172,10 @@ class SysModuleTest(unittest.TestCase):
|
|||
|
||||
def test_setcheckinterval(self):
|
||||
self.assertRaises(TypeError, sys.setcheckinterval)
|
||||
sys.setcheckinterval(120)
|
||||
sys.setcheckinterval(100)
|
||||
orig = sys.getcheckinterval()
|
||||
for n in 0, 100, 120, orig: # orig last to restore starting state
|
||||
sys.setcheckinterval(n)
|
||||
self.assertEquals(sys.getcheckinterval(), n)
|
||||
|
||||
def test_recursionlimit(self):
|
||||
self.assertRaises(TypeError, sys.getrecursionlimit, 42)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue