From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 6 Aug 2022 16:16:01 +0000 (-0700) Subject: Fix typo in test_dataclasses.py (gh-95735) X-Git-Tag: v3.10.7~86 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9a23f582ee0c64954b930c9c03d1fd02ce8d4044;p=thirdparty%2FPython%2Fcpython.git 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 --- 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 TestInit(unittest.TestCase): 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):