Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Lib/idlelib/idle_test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ def test_close(self):
self.assertRaises(TypeError, f.close, 1)


class TestSysRecursionLimitWrappers(unittest.TestCase):
class RecursionLimitTest(unittest.TestCase):
# Test (un)install_recursionlimit_wrappers and fixdoc.

def test_bad_setrecursionlimit_calls(self):
run.install_recursionlimit_wrappers()
Expand All @@ -296,12 +297,12 @@ def test_roundtrip(self):
run.install_recursionlimit_wrappers()
self.addCleanup(run.uninstall_recursionlimit_wrappers)

# check that setting the recursion limit works
# Check that setting the recursion limit works.
orig_reclimit = sys.getrecursionlimit()
self.addCleanup(sys.setrecursionlimit, orig_reclimit)
sys.setrecursionlimit(orig_reclimit + 3)

# check that the new limit is returned by sys.getrecursionlimit()
# Check that the new limit is returned by sys.getrecursionlimit().
new_reclimit = sys.getrecursionlimit()
self.assertEqual(new_reclimit, orig_reclimit + 3)

Expand All @@ -313,6 +314,7 @@ def test_default_recursion_limit_preserved(self):
self.assertEqual(new_reclimit, orig_reclimit)

def test_fixdoc(self):
# Put here until better place for miscellaneous test.
def func(): "docstring"
run.fixdoc(func, "more")
self.assertEqual(func.__doc__, "docstring\n\nmore")
Expand Down