diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-07-06 18:36:54 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-07-06 18:36:54 (GMT) |
commit | e5e065b6699b33244e58b798e7b17b39bf2945a0 (patch) | |
tree | 4905c09e80e5b5d238315a36de4702ac7c1c2cd7 /Lib | |
parent | d6640d4bd01874fc469c58c506527465a62d140b (diff) | |
download | cpython-e5e065b6699b33244e58b798e7b17b39bf2945a0.zip cpython-e5e065b6699b33244e58b798e7b17b39bf2945a0.tar.gz cpython-e5e065b6699b33244e58b798e7b17b39bf2945a0.tar.bz2 |
New function sys.getcheckinterval(), to complement setcheckinterval().
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_sys.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 0e61c6f..48336b4 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -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) |