diff options
author | Larry Hastings <larry@hastings.org> | 2014-03-17 05:54:05 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2014-03-17 05:54:05 (GMT) |
commit | 3c5c56f3c068bc13daea2275b951113b43a91e85 (patch) | |
tree | 1395bfb10902b7087a4ca1551f4bdb271b55ed43 /Lib/test/test_pydoc.py | |
parent | e41b73caca2b543422f423a2ac07c29de834f44d (diff) | |
parent | 2221f666eba4a6f46f2095a801bc3e4bdbdb97d2 (diff) | |
download | cpython-3c5c56f3c068bc13daea2275b951113b43a91e85.zip cpython-3c5c56f3c068bc13daea2275b951113b43a91e85.tar.gz cpython-3c5c56f3c068bc13daea2275b951113b43a91e85.tar.bz2 |
Merged default into 3.4 branch. 3.4 branch is now effectively 3.4.1rc1.
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r-- | Lib/test/test_pydoc.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index 81b58a2..f26fb15 100644 --- a/Lib/test/test_pydoc.py +++ b/Lib/test/test_pydoc.py @@ -387,6 +387,16 @@ class PydocDocTest(unittest.TestCase): print_diffs(expected_text, result) self.fail("outputs are not equal, see diff above") + def test_text_enum_member_with_value_zero(self): + # Test issue #20654 to ensure enum member with value 0 can be + # displayed. It used to throw KeyError: 'zero'. + import enum + class BinaryInteger(enum.IntEnum): + zero = 0 + one = 1 + doc = pydoc.render_doc(BinaryInteger) + self.assertIn('<BinaryInteger.zero: 0>', doc) + def test_issue8225(self): # Test issue8225 to ensure no doc link appears for xml.etree result, doc_loc = get_pydoc_text(xml.etree) |