summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/idle_test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-07-09 18:59:19 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2019-07-09 18:59:19 (GMT)
commitb82188d9bad1774624cb1788dbdec2f0d7d65688 (patch)
tree2c9be82bbf577be8c63c61452d965e55536ab200 /Lib/idlelib/idle_test
parent68bd9c5691c4899d21cc7fe6cce7cd22b2f5ccb0 (diff)
downloadcpython-b82188d9bad1774624cb1788dbdec2f0d7d65688.zip
cpython-b82188d9bad1774624cb1788dbdec2f0d7d65688.tar.gz
cpython-b82188d9bad1774624cb1788dbdec2f0d7d65688.tar.bz2
bpo-26806: IDLE should run without docstrings (GH-14657) (GH-14677)
After fcf1d00, IDLE startup failed with python compiled without docstrings. (cherry picked from commit 6aeb2fe606408aae14c246470794f1303b3be812) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
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)