diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-07-09 18:59:19 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2019-07-09 18:59:19 (GMT) |
commit | b82188d9bad1774624cb1788dbdec2f0d7d65688 (patch) | |
tree | 2c9be82bbf577be8c63c61452d965e55536ab200 /Lib/idlelib/idle_test/test_run.py | |
parent | 68bd9c5691c4899d21cc7fe6cce7cd22b2f5ccb0 (diff) | |
download | cpython-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/test_run.py')
-rw-r--r-- | Lib/idlelib/idle_test/test_run.py | 8 |
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) |