summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-04-28 04:42:55 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-04-28 04:42:55 (GMT)
commitb185a04aa10209df7c5fa329696e3c33c38eba7a (patch)
tree491c503fa4a8b867ca5228af5a3d19f0628c4a6b /Lib/test/test_pydoc.py
parent507cbc17731b33d87159f63fd1c4237a74bb285b (diff)
downloadcpython-b185a04aa10209df7c5fa329696e3c33c38eba7a.zip
cpython-b185a04aa10209df7c5fa329696e3c33c38eba7a.tar.gz
cpython-b185a04aa10209df7c5fa329696e3c33c38eba7a.tar.bz2
#11926: add missing keywords to help("keywords").
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r--Lib/test/test_pydoc.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index f7aa487..fa49bb8 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -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()