[Python-checkins] Fix typo in test_dataclasses.py (gh-95735)
ericvsmith
webhook-mailer at python.org
Sat Aug 6 11:56:10 EDT 2022
https://github.com/python/cpython/commit/59e09efe888affe549e9249f188797c1325edecc
commit: 59e09efe888affe549e9249f188797c1325edecc
branch: main
author: da-woods <dw-git at d-woods.co.uk>
committer: ericvsmith <ericvsmith at users.noreply.github.com>
date: 2022-08-06T11:56:00-04: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.
files:
M Lib/test/test_dataclasses.py
diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py
index cfa82093dfb..e2eab695789 100644
--- a/Lib/test/test_dataclasses.py
+++ b/Lib/test/test_dataclasses.py
@@ -2215,12 +2215,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