diff options
author | Brandt Bucher <brandt@python.org> | 2021-04-08 19:54:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 19:54:34 (GMT) |
commit | d92c59f48680122ce0e4d1ccf69d92b983e8db01 (patch) | |
tree | 439083fc302e91d4f4819425cbb5a0635f493b48 /Lib/test/test_dataclasses.py | |
parent | 28d28e053db6b69d91c2dfd579207cd8ccbc39e7 (diff) | |
download | cpython-d92c59f48680122ce0e4d1ccf69d92b983e8db01.zip cpython-d92c59f48680122ce0e4d1ccf69d92b983e8db01.tar.gz cpython-d92c59f48680122ce0e4d1ccf69d92b983e8db01.tar.bz2 |
bpo-43764: Fix `__match_args__` generation logic for dataclasses (GH-25284)
Diffstat (limited to 'Lib/test/test_dataclasses.py')
-rw-r--r-- | Lib/test/test_dataclasses.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py index 12c1918..29f29e1 100644 --- a/Lib/test/test_dataclasses.py +++ b/Lib/test/test_dataclasses.py @@ -3432,6 +3432,14 @@ class TestMatchArgs(unittest.TestCase): __match_args__ = ma self.assertIs(C(42).__match_args__, ma) + def test_bpo_43764(self): + @dataclass(repr=False, eq=False, init=False) + class X: + a: int + b: int + c: int + self.assertEqual(X.__match_args__, ("a", "b", "c")) + if __name__ == '__main__': unittest.main() |