From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 9 Aug 2022 11:46:20 +0000 (-0700) Subject: Fix typo in test_dataclasses.py (gh-95735) (gh-95740) X-Git-Tag: v3.11.0rc2~142 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=514ec820319138242589f9ca0aa2277de0a1c453;p=thirdparty%2FPython%2Fcpython.git Fix typo in test_dataclasses.py (gh-95735) (gh-95740) `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 Co-authored-by: da-woods --- diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py index 569f97902a39..63380ea0b680 100644 --- a/Lib/test/test_dataclasses.py +++ b/Lib/test/test_dataclasses.py @@ -2215,12 +2215,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):