Skip to content

Commit 8b67bf9

Browse files
authored
Improve renamed test_run.RecursionLimitTest (GH-21794)
PEP 8 style and new comments.
1 parent e28b8c9 commit 8b67bf9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Lib/idlelib/idle_test/test_run.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ def test_close(self):
282282
self.assertRaises(TypeError, f.close, 1)
283283

284284

285-
class TestSysRecursionLimitWrappers(unittest.TestCase):
285+
class RecursionLimitTest(unittest.TestCase):
286+
# Test (un)install_recursionlimit_wrappers and fixdoc.
286287

287288
def test_bad_setrecursionlimit_calls(self):
288289
run.install_recursionlimit_wrappers()
@@ -296,12 +297,12 @@ def test_roundtrip(self):
296297
run.install_recursionlimit_wrappers()
297298
self.addCleanup(run.uninstall_recursionlimit_wrappers)
298299

299-
# check that setting the recursion limit works
300+
# Check that setting the recursion limit works.
300301
orig_reclimit = sys.getrecursionlimit()
301302
self.addCleanup(sys.setrecursionlimit, orig_reclimit)
302303
sys.setrecursionlimit(orig_reclimit + 3)
303304

304-
# check that the new limit is returned by sys.getrecursionlimit()
305+
# Check that the new limit is returned by sys.getrecursionlimit().
305306
new_reclimit = sys.getrecursionlimit()
306307
self.assertEqual(new_reclimit, orig_reclimit + 3)
307308

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

315316
def test_fixdoc(self):
317+
# Put here until better place for miscellaneous test.
316318
def func(): "docstring"
317319
run.fixdoc(func, "more")
318320
self.assertEqual(func.__doc__, "docstring\n\nmore")

0 commit comments

Comments
 (0)