summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/idle_test
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2019-07-09 18:37:25 (GMT)
committerGitHub <noreply@github.com>2019-07-09 18:37:25 (GMT)
commit6aeb2fe606408aae14c246470794f1303b3be812 (patch)
tree48782e72a5bd32ede665a7fd8554231ed8cd1c63 /Lib/idlelib/idle_test
parent3a3db970de344efbb4017fb9dde9204f0fd4bbdc (diff)
downloadcpython-6aeb2fe606408aae14c246470794f1303b3be812.zip
cpython-6aeb2fe606408aae14c246470794f1303b3be812.tar.gz
cpython-6aeb2fe606408aae14c246470794f1303b3be812.tar.bz2
bpo-26806: IDLE should run without docstrings (#14657)
After fcf1d00, IDLE startup failed with python compiled without docstrings.
Diffstat (limited to 'Lib/idlelib/idle_test')
-rw-r--r--Lib/idlelib/idle_test/test_run.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/idlelib/idle_test/test_run.py b/Lib/idlelib/idle_test/test_run.py
index d0f1e92..cad0b4d 100644
--- a/Lib/idlelib/idle_test/test_run.py
+++ b/Lib/idlelib/idle_test/test_run.py
@@ -292,6 +292,14 @@ class TestSysRecursionLimitWrappers(unittest.TestCase):
new_reclimit = sys.getrecursionlimit()
self.assertEqual(new_reclimit, orig_reclimit)
+ def test_fixdoc(self):
+ def func(): "docstring"
+ run.fixdoc(func, "more")
+ self.assertEqual(func.__doc__, "docstring\n\nmore")
+ func.__doc__ = None
+ run.fixdoc(func, "more")
+ self.assertEqual(func.__doc__, "more")
+
if __name__ == '__main__':
unittest.main(verbosity=2)