[Python-checkins] Fix typo in test_dataclasses.py (gh-95735)
miss-islington
webhook-mailer at python.org
Sat Aug 6 12:16:05 EDT 2022
https://github.com/python/cpython/commit/9a23f582ee0c64954b930c9c03d1fd02ce8d4044
commit: 9a23f582ee0c64954b930c9c03d1fd02ce8d4044
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-08-06T09:16:01-07:00
summary:
Fix typo in test_dataclasses.py (gh-95735)
`dataclass` was called as a function when it was almost certainly intended to be a decorator.
(cherry picked from commit 59e09efe888affe549e9249f188797c1325edecc)
Co-authored-by: da-woods <dw-git at d-woods.co.uk>
files:
M Lib/test/test_dataclasses.py
diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py
index f4f7ed5acab4..f72e81c31e61 100644
--- a/Lib/test/test_dataclasses.py
+++ b/Lib/test/test_dataclasses.py
@@ -2129,12 +2129,12 @@ class C(B):
self.assertEqual(c.z, 100)
def test_no_init(self):
- dataclass(init=False)
+ @dataclass(init=False)
class C:
i: int = 0
self.assertEqual(C().i, 0)
- dataclass(init=False)
+ @dataclass(init=False)
class C:
i: int = 2
def __init__(self):
More information about the Python-checkins
mailing list