From: Nikita Sobolev Date: Sun, 30 Apr 2023 17:16:55 +0000 (+0300) Subject: gh-104015: Fix direct invocation of `test_dataclasses` (#104017) X-Git-Tag: v3.12.0b1~356 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=654d44b3a4d3ee4d92b690668aa5189acf4f9d8f;p=thirdparty%2FPython%2Fcpython.git gh-104015: Fix direct invocation of `test_dataclasses` (#104017) Previously, `python -m test test_dataclasses` passed, but `./python.exe Lib/test/test_dataclasses.py` failed --- diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py index 7dd81a8855f1..7b48b26f9e77 100644 --- a/Lib/test/test_dataclasses.py +++ b/Lib/test/test_dataclasses.py @@ -3671,7 +3671,7 @@ class TestStringAnnotations(unittest.TestCase): ByMakeDataClass = make_dataclass('ByMakeDataClass', [('x', int)]) ManualModuleMakeDataClass = make_dataclass('ManualModuleMakeDataClass', [('x', int)], - module='test.test_dataclasses') + module=__name__) WrongNameMakeDataclass = make_dataclass('Wrong', [('x', int)]) WrongModuleMakeDataclass = make_dataclass('WrongModuleMakeDataclass', [('x', int)],