diff options
author | Ethan Furman <ethan@stoneleaf.us> | 2015-04-12 06:23:06 (GMT) |
---|---|---|
committer | Ethan Furman <ethan@stoneleaf.us> | 2015-04-12 06:23:06 (GMT) |
commit | 48a724fa33143bcbab2228058d3f59e1813bd49c (patch) | |
tree | 1e5ab980434e531aa80d841c3072978c9b925f6c /Lib/test/test_enum.py | |
parent | a1c7e727c8fd9a9bf924ecc20c7d6892d19aa99e (diff) | |
download | cpython-48a724fa33143bcbab2228058d3f59e1813bd49c.zip cpython-48a724fa33143bcbab2228058d3f59e1813bd49c.tar.gz cpython-48a724fa33143bcbab2228058d3f59e1813bd49c.tar.bz2 |
Close issue23900: add default __doc__ to new enumerations that do not specify one.
Diffstat (limited to 'Lib/test/test_enum.py')
-rw-r--r-- | Lib/test/test_enum.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index 1e8c080..4b5d0d0 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -1560,9 +1560,7 @@ expected_help_output_with_docs = """\ Help on class Color in module %s: class Color(enum.Enum) - | Generic enumeration. - |\x20\x20 - | Derive from this class to define new enumerations. + | An enumeration. |\x20\x20 | Method resolution order: | Color @@ -1626,6 +1624,8 @@ class Color(enum.Enum) class TestStdLib(unittest.TestCase): + maxDiff = None + class Color(Enum): red = 1 green = 2 @@ -1646,7 +1646,7 @@ class TestStdLib(unittest.TestCase): def test_inspect_getmembers(self): values = dict(( ('__class__', EnumMeta), - ('__doc__', None), + ('__doc__', 'An enumeration.'), ('__members__', self.Color.__members__), ('__module__', __name__), ('blue', self.Color.blue), @@ -1674,7 +1674,7 @@ class TestStdLib(unittest.TestCase): Attribute(name='__class__', kind='data', defining_class=object, object=EnumMeta), Attribute(name='__doc__', kind='data', - defining_class=self.Color, object=None), + defining_class=self.Color, object='An enumeration.'), Attribute(name='__members__', kind='property', defining_class=EnumMeta, object=EnumMeta.__members__), Attribute(name='__module__', kind='data', |