mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#11926: add missing keywords to help("keywords").
This commit is contained in:
parent
507cbc1773
commit
b185a04aa1
3 changed files with 51 additions and 38 deletions
|
@ -6,6 +6,7 @@ import subprocess
|
|||
import re
|
||||
import pydoc
|
||||
import inspect
|
||||
import keyword
|
||||
import unittest
|
||||
import test.support
|
||||
import xml.etree
|
||||
|
@ -344,8 +345,13 @@ class TestDescriptions(unittest.TestCase):
|
|||
self.assertTrue(expected in pydoc.render_doc(c))
|
||||
|
||||
|
||||
class TestHelper(unittest.TestCase):
|
||||
def test_keywords(self):
|
||||
self.assertEqual(sorted(pydoc.Helper.keywords),
|
||||
sorted(keyword.kwlist))
|
||||
|
||||
def test_main():
|
||||
test.support.run_unittest(PyDocDocTest, TestDescriptions)
|
||||
test.support.run_unittest(PyDocDocTest, TestDescriptions, TestHelper)
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue