diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2023-04-17 23:33:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-17 23:33:22 (GMT) |
commit | b57f55c23e15654e9dd77680ff1462603e360b76 (patch) | |
tree | 29a6455de3cd2cc12b786b472f4ba9ca433de7e0 /Lib/test/test_dataclasses.py | |
parent | d83faf7f1ba2de95e98e3eeb5ce9009d9cd62192 (diff) | |
download | cpython-b57f55c23e15654e9dd77680ff1462603e360b76.zip cpython-b57f55c23e15654e9dd77680ff1462603e360b76.tar.gz cpython-b57f55c23e15654e9dd77680ff1462603e360b76.tar.bz2 |
gh-103449: Fix a bug in dataclass docstring generation (#103454)
Diffstat (limited to 'Lib/test/test_dataclasses.py')
-rw-r--r-- | Lib/test/test_dataclasses.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py index 6888680..ae8bfcc 100644 --- a/Lib/test/test_dataclasses.py +++ b/Lib/test/test_dataclasses.py @@ -2297,6 +2297,19 @@ class TestDocString(unittest.TestCase): self.assertDocStrEqual(C.__doc__, "C(x:collections.deque=<factory>)") + def test_docstring_with_no_signature(self): + # See https://github.com/python/cpython/issues/103449 + class Meta(type): + __call__ = dict + class Base(metaclass=Meta): + pass + + @dataclass + class C(Base): + pass + + self.assertDocStrEqual(C.__doc__, "C") + class TestInit(unittest.TestCase): def test_base_has_init(self): |