From: Ezio Melotti Date: Thu, 28 Apr 2011 04:59:33 +0000 (+0300) Subject: Backport test from #11926. X-Git-Tag: v2.7.2rc1~105 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bdfa2e69e22adf4d5f74f77938f5371f2cbbf241;p=thirdparty%2FPython%2Fcpython.git Backport test from #11926. --- diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index 2e67290d00ec..85916932384b 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()