summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2009-05-27 20:07:21 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2009-05-27 20:07:21 (GMT)
commitd67ea7d4c68a417d9854a15bc4f51478770ef920 (patch)
treeb574a6069efcc70984896a0e6cedc11c306ed3f1 /Lib/test/test_pydoc.py
parent1afec5d6bf1f0e5d0cb62e633c69ed37e2f03a9c (diff)
downloadcpython-d67ea7d4c68a417d9854a15bc4f51478770ef920.zip
cpython-d67ea7d4c68a417d9854a15bc4f51478770ef920.tar.gz
cpython-d67ea7d4c68a417d9854a15bc4f51478770ef920.tar.bz2
fix issue #6121 by stripping spaces from the argument in the 'help'
function.
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r--Lib/test/test_pydoc.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index 91a9977..7990d3a 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -237,6 +237,14 @@ class PyDocDocTest(unittest.TestCase):
self.assertEqual(expected, result,
"documentation for missing module found")
+ def test_input_strip(self):
+ missing_module = " test.i_am_not_here "
+ result = run_pydoc(missing_module)
+ expected = missing_pattern % missing_module.strip()
+ self.assertEqual(expected, result,
+ "white space was not stripped from module name "
+ "or other error output mismatch")
+
class TestDescriptions(unittest.TestCase):