summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-04-28 04:59:33 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-04-28 04:59:33 (GMT)
commitbdfa2e69e22adf4d5f74f77938f5371f2cbbf241 (patch)
tree7a19b8aa23de50de7eaed654057323319737af25
parentbd0933a68767e20ff313a466f063e09f57f61f42 (diff)
downloadcpython-bdfa2e69e22adf4d5f74f77938f5371f2cbbf241.zip
cpython-bdfa2e69e22adf4d5f74f77938f5371f2cbbf241.tar.gz
cpython-bdfa2e69e22adf4d5f74f77938f5371f2cbbf241.tar.bz2
Backport test from #11926.
-rw-r--r--Lib/test/test_pydoc.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index 2e67290..8591693 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 xml.etree
import test.test_support
@@ -351,9 +352,16 @@ class TestDescriptions(unittest.TestCase):
self.assertIn('_asdict', helptext)
+class TestHelper(unittest.TestCase):
+ def test_keywords(self):
+ self.assertEqual(sorted(pydoc.Helper.keywords),
+ sorted(keyword.kwlist))
+
+
def test_main():
test.test_support.run_unittest(PyDocDocTest,
- TestDescriptions)
+ TestDescriptions,
+ TestHelper)
if __name__ == "__main__":
test_main()