Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.

This commit is contained in:
Serhiy Storchaka 2015-04-21 21:11:13 +03:00
commit f5e8540e1b
3 changed files with 11 additions and 1 deletions

View file

@ -1006,6 +1006,14 @@ class PydocWithMetaClasses(unittest.TestCase):
result = output.getvalue().strip()
self.assertEqual(expected_text, result)
def test_resolve_false(self):
# Issue #23008: pydoc enum.{,Int}Enum failed
# because bool(enum.Enum) is False.
with captured_stdout() as help_io:
pydoc.help('enum.Enum')
helptext = help_io.getvalue()
self.assertIn('class Enum', helptext)
@reap_threads
def test_main():