From a9c7bc0acdbec39d1749e0dbd1fc2d94903e0df7 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 17 Mar 2025 19:17:31 +0300 Subject: [PATCH 01/18] fixed test_regrtest added environment variable value "PYTHONREGRTEST_UNICODE_GUARD0" when calling the test directly --- Lib/test/test_regrtest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index 510c8f69631bac..b6e61cf35451d6 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -1931,6 +1931,8 @@ def test_print_warning(self): def test_unicode_guard_env(self): guard = os.environ.get(setup.UNICODE_GUARD_ENV) + # if you run the test directly, + # then look at the if __name__ == '__main__' of this file self.assertIsNotNone(guard, f"{setup.UNICODE_GUARD_ENV} not set") if guard.isascii(): # Skip to signify that the env var value was changed by the user; @@ -2546,4 +2548,5 @@ def test_test_result_get_state(self): if __name__ == '__main__': + os.environ['PYTHONREGRTEST_UNICODE_GUARD'] = 'some_value' # for test_unicode_guard_env unittest.main() From b875bee5d49ac558b5db2cfbb7c90debfdd30256 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 17 Mar 2025 19:21:14 +0300 Subject: [PATCH 02/18] added spec in test.test_pyclbr.py added spec for test when calling directly --- Lib/test/test_pyclbr.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py index 74910980567763..62fad5c898b550 100644 --- a/Lib/test/test_pyclbr.py +++ b/Lib/test/test_pyclbr.py @@ -260,4 +260,12 @@ def test_module_has_no_spec(self): if __name__ == "__main__": + import importlib.util + + # Adding the __spec__ attribute to the __main__ module + if getattr(sys.modules["__main__"], "__spec__", None) is None: + sys.modules["__main__"].__spec__ = importlib.machinery.ModuleSpec( + name="__main__", loader=None, origin="builtin" + ) + unittest_main() From 678893fa65f2ad70b4a8a5a950e84bdf0f76db38 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 17 Mar 2025 19:22:57 +0300 Subject: [PATCH 03/18] changed module name when calling test_metaclass.py directly --- Lib/test/test_metaclass.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_metaclass.py b/Lib/test/test_metaclass.py index 07a333f98fa0a9..f8ee548044128d 100644 --- a/Lib/test/test_metaclass.py +++ b/Lib/test/test_metaclass.py @@ -297,4 +297,5 @@ def load_tests(loader, tests, pattern): if __name__ == "__main__": + __name__ = "test.test_metaclass" unittest.main() From 3241aebc58d486449b9b458d657a2bca82a77447 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 17 Mar 2025 19:48:37 +0300 Subject: [PATCH 04/18] added Misc/NEWS --- .../next/Tests/2025-03-17-19-47-27.gh-issue-131290.NyCIXR.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Tests/2025-03-17-19-47-27.gh-issue-131290.NyCIXR.rst diff --git a/Misc/NEWS.d/next/Tests/2025-03-17-19-47-27.gh-issue-131290.NyCIXR.rst b/Misc/NEWS.d/next/Tests/2025-03-17-19-47-27.gh-issue-131290.NyCIXR.rst new file mode 100644 index 00000000000000..e6f6b7af4a4272 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2025-03-17-19-47-27.gh-issue-131290.NyCIXR.rst @@ -0,0 +1 @@ +# Several tests are modified when called directly via ./python Lib/test/... From d3cdd6b364a4dcdeb3649ac5d1d56dfa2b83f471 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Wed, 19 Mar 2025 16:53:54 +0300 Subject: [PATCH 05/18] Apply review suggestions for test_regrtest --- Lib/test/test_regrtest.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index b6e61cf35451d6..7e317d5ab943ff 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -1931,8 +1931,6 @@ def test_print_warning(self): def test_unicode_guard_env(self): guard = os.environ.get(setup.UNICODE_GUARD_ENV) - # if you run the test directly, - # then look at the if __name__ == '__main__' of this file self.assertIsNotNone(guard, f"{setup.UNICODE_GUARD_ENV} not set") if guard.isascii(): # Skip to signify that the env var value was changed by the user; @@ -2548,5 +2546,5 @@ def test_test_result_get_state(self): if __name__ == '__main__': - os.environ['PYTHONREGRTEST_UNICODE_GUARD'] = 'some_value' # for test_unicode_guard_env + setup.setup_process() unittest.main() From 682613fe03edab2be1362583ecb663c928a75559 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Sun, 6 Apr 2025 23:46:06 +0300 Subject: [PATCH 06/18] added comment for test_metaclass.py --- Lib/test/test_metaclass.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_metaclass.py b/Lib/test/test_metaclass.py index f8ee548044128d..627c29fdb18ab3 100644 --- a/Lib/test/test_metaclass.py +++ b/Lib/test/test_metaclass.py @@ -297,5 +297,6 @@ def load_tests(loader, tests, pattern): if __name__ == "__main__": + # set __name__ to match doctest expectations __name__ = "test.test_metaclass" unittest.main() From 22c996df7cef6f713cd82bda813a635c1ca19522 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 7 Apr 2025 00:10:28 +0300 Subject: [PATCH 07/18] refactor(tests): improve structure and naming in test_pyclbr.py --- Lib/test/test_pyclbr.py | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py index 62fad5c898b550..42c66c75dafff1 100644 --- a/Lib/test/test_pyclbr.py +++ b/Lib/test/test_pyclbr.py @@ -142,6 +142,12 @@ def defined_in(item, module): self.assertHaskey(dict, name, ignore) def test_easy(self): + import importlib.util + if getattr(sys.modules["__main__"], "__spec__", None) is None: + sys.modules["__main__"].__spec__ = importlib.machinery.ModuleSpec( + name="__main__", loader=None, origin="built-in" + ) + self.checkModule('pyclbr') # XXX: Metaclasses are not supported # self.checkModule('ast') @@ -214,6 +220,18 @@ def compare(parent1, children1, parent2, children2): compare(None, actual, None, expected) + def test_pdb_module(self): + import importlib.util + if getattr(sys.modules["__main__"], "__spec__", None) is None: + sys.modules["__main__"].__spec__ = importlib.machinery.ModuleSpec( + name="__main__", loader=None, origin="builtin" + ) + + self.checkModule( + 'pdb', + ignore=('_ModuleTarget', '_ScriptTarget', '_ZipTarget', 'Pdb'), + ) + def test_others(self): cm = self.checkModule @@ -223,11 +241,6 @@ def test_others(self): with warnings.catch_warnings(): warnings.simplefilter('ignore', DeprecationWarning) cm('sre_parse', ignore=('dump', 'groups', 'pos')) # from sre_constants import *; property - cm( - 'pdb', - # pyclbr does not handle elegantly `typing` or properties - ignore=('Union', '_ModuleTarget', '_ScriptTarget', '_ZipTarget', 'curframe_locals'), - ) cm('pydoc', ignore=('input', 'output',)) # properties # Tests for modules inside packages @@ -260,12 +273,4 @@ def test_module_has_no_spec(self): if __name__ == "__main__": - import importlib.util - - # Adding the __spec__ attribute to the __main__ module - if getattr(sys.modules["__main__"], "__spec__", None) is None: - sys.modules["__main__"].__spec__ = importlib.machinery.ModuleSpec( - name="__main__", loader=None, origin="builtin" - ) - unittest_main() From 6744e914a56c4e98e063cc0d6e92a6a043cf5d16 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 7 Apr 2025 00:22:28 +0300 Subject: [PATCH 08/18] created news file --- .../Tests/2025-04-07-13-45-23.gh-issue-131290.MaximGit1.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Tests/2025-04-07-13-45-23.gh-issue-131290.MaximGit1.rst diff --git a/Misc/NEWS.d/next/Tests/2025-04-07-13-45-23.gh-issue-131290.MaximGit1.rst b/Misc/NEWS.d/next/Tests/2025-04-07-13-45-23.gh-issue-131290.MaximGit1.rst new file mode 100644 index 00000000000000..211b4247d0f6e8 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2025-04-07-13-45-23.gh-issue-131290.MaximGit1.rst @@ -0,0 +1,3 @@ +Tests in :file:`Lib/test` can now be correctly executed as standalone scripts. + +Several tests were modified to correctly handle execution when called directly via `./python Lib/test/...`, ensuring that the `__spec__` attribute is properly set in certain modules like `__main__`. From 25094788197d0458944af42142e081d016cc5be2 Mon Sep 17 00:00:00 2001 From: Maksim <130899353+MaximGit1@users.noreply.github.com> Date: Mon, 7 Apr 2025 00:26:20 +0300 Subject: [PATCH 09/18] Update Misc/NEWS.d/next/Tests/2025-03-17-19-47-27.gh-issue-131290.NyCIXR.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --- .../next/Tests/2025-03-17-19-47-27.gh-issue-131290.NyCIXR.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Tests/2025-03-17-19-47-27.gh-issue-131290.NyCIXR.rst b/Misc/NEWS.d/next/Tests/2025-03-17-19-47-27.gh-issue-131290.NyCIXR.rst index e6f6b7af4a4272..c6f0e0cc25623d 100644 --- a/Misc/NEWS.d/next/Tests/2025-03-17-19-47-27.gh-issue-131290.NyCIXR.rst +++ b/Misc/NEWS.d/next/Tests/2025-03-17-19-47-27.gh-issue-131290.NyCIXR.rst @@ -1 +1 @@ -# Several tests are modified when called directly via ./python Lib/test/... +Tests in :file:`Lib/test` can now be correctly executed as standalone scripts. From fd29fd15d87a63674a8c8f5384fe0ab3fd11d0a8 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 7 Apr 2025 00:34:54 +0300 Subject: [PATCH 10/18] Removed new entry file NEWS --- .../Tests/2025-04-07-13-45-23.gh-issue-131290.MaximGit1.rst | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 Misc/NEWS.d/next/Tests/2025-04-07-13-45-23.gh-issue-131290.MaximGit1.rst diff --git a/Misc/NEWS.d/next/Tests/2025-04-07-13-45-23.gh-issue-131290.MaximGit1.rst b/Misc/NEWS.d/next/Tests/2025-04-07-13-45-23.gh-issue-131290.MaximGit1.rst deleted file mode 100644 index 211b4247d0f6e8..00000000000000 --- a/Misc/NEWS.d/next/Tests/2025-04-07-13-45-23.gh-issue-131290.MaximGit1.rst +++ /dev/null @@ -1,3 +0,0 @@ -Tests in :file:`Lib/test` can now be correctly executed as standalone scripts. - -Several tests were modified to correctly handle execution when called directly via `./python Lib/test/...`, ensuring that the `__spec__` attribute is properly set in certain modules like `__main__`. From bef8cc5c2e108112627210b2cc61c6a06cb025c4 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 7 Apr 2025 00:42:26 +0300 Subject: [PATCH 11/18] local import removed in test_pyclbr.py --- Lib/test/test_pyclbr.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py index 42c66c75dafff1..1fb718336909f9 100644 --- a/Lib/test/test_pyclbr.py +++ b/Lib/test/test_pyclbr.py @@ -9,6 +9,7 @@ import pyclbr from unittest import TestCase, main as unittest_main from test.test_importlib import util as test_importlib_util +import importlib.util import warnings @@ -142,7 +143,6 @@ def defined_in(item, module): self.assertHaskey(dict, name, ignore) def test_easy(self): - import importlib.util if getattr(sys.modules["__main__"], "__spec__", None) is None: sys.modules["__main__"].__spec__ = importlib.machinery.ModuleSpec( name="__main__", loader=None, origin="built-in" @@ -221,7 +221,6 @@ def compare(parent1, children1, parent2, children2): compare(None, actual, None, expected) def test_pdb_module(self): - import importlib.util if getattr(sys.modules["__main__"], "__spec__", None) is None: sys.modules["__main__"].__spec__ = importlib.machinery.ModuleSpec( name="__main__", loader=None, origin="builtin" From 584e07b91463d89a2a76a8cbe571a151e837466f Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 7 Apr 2025 00:56:01 +0300 Subject: [PATCH 12/18] Created contextmanager for temporarily setting __spec__ on __main__ module --- Lib/test/test_pyclbr.py | 45 +++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py index 1fb718336909f9..5a00c36645d09d 100644 --- a/Lib/test/test_pyclbr.py +++ b/Lib/test/test_pyclbr.py @@ -5,8 +5,10 @@ import sys from textwrap import dedent +from contextlib import contextmanager from types import FunctionType, MethodType, BuiltinFunctionType import pyclbr +import importlib.machinery from unittest import TestCase, main as unittest_main from test.test_importlib import util as test_importlib_util import importlib.util @@ -23,6 +25,27 @@ # is imperfect (as designed), testModule is called with a set of # members to ignore. + +@contextmanager +def temporary_main_spec(): + """ + A context manager that temporarily sets the `__spec__` attribute + of the `__main__` module if it's missing. + """ + original_spec = getattr(sys.modules["__main__"], "__spec__", None) + try: + if original_spec is None: + sys.modules["__main__"].__spec__ = importlib.machinery.ModuleSpec( + name="__main__", loader=None, origin="built-in" + ) + yield + finally: + if original_spec is None: + del sys.modules["__main__"].__spec__ + else: + sys.modules["__main__"].__spec__ = original_spec + + class PyclbrTest(TestCase): def assertListEq(self, l1, l2, ignore): @@ -143,16 +166,12 @@ def defined_in(item, module): self.assertHaskey(dict, name, ignore) def test_easy(self): - if getattr(sys.modules["__main__"], "__spec__", None) is None: - sys.modules["__main__"].__spec__ = importlib.machinery.ModuleSpec( - name="__main__", loader=None, origin="built-in" - ) - self.checkModule('pyclbr') # XXX: Metaclasses are not supported # self.checkModule('ast') - self.checkModule('doctest', ignore=("TestResults", "_SpoofOut", - "DocTestCase", '_DocTestSuite')) + with temporary_main_spec(): + self.checkModule('doctest', ignore=("TestResults", "_SpoofOut", + "DocTestCase", '_DocTestSuite')) self.checkModule('difflib', ignore=("Match",)) def test_cases(self): @@ -221,16 +240,12 @@ def compare(parent1, children1, parent2, children2): compare(None, actual, None, expected) def test_pdb_module(self): - if getattr(sys.modules["__main__"], "__spec__", None) is None: - sys.modules["__main__"].__spec__ = importlib.machinery.ModuleSpec( - name="__main__", loader=None, origin="builtin" + with temporary_main_spec(): + self.checkModule( + 'pdb', + ignore=('_ModuleTarget', '_ScriptTarget', '_ZipTarget', 'Pdb'), ) - self.checkModule( - 'pdb', - ignore=('_ModuleTarget', '_ScriptTarget', '_ZipTarget', 'Pdb'), - ) - def test_others(self): cm = self.checkModule From 9ec71f2feae3ba7b2025d0ae6bd44f08ddfd6046 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 7 Apr 2025 01:14:34 +0300 Subject: [PATCH 13/18] imports order changed --- Lib/test/test_pyclbr.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py index 5a00c36645d09d..464758288a5416 100644 --- a/Lib/test/test_pyclbr.py +++ b/Lib/test/test_pyclbr.py @@ -3,15 +3,16 @@ Nick Mathewson ''' +import importlib.util import sys -from textwrap import dedent from contextlib import contextmanager +from textwrap import dedent from types import FunctionType, MethodType, BuiltinFunctionType import pyclbr import importlib.machinery from unittest import TestCase, main as unittest_main from test.test_importlib import util as test_importlib_util -import importlib.util + import warnings From 2134259b8ae7f27880e319102208dfe49b71d575 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 7 Apr 2025 17:41:57 +0300 Subject: [PATCH 14/18] refactored contextmanager --- Lib/test/test_pyclbr.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py index 464758288a5416..8840507bfd2c0a 100644 --- a/Lib/test/test_pyclbr.py +++ b/Lib/test/test_pyclbr.py @@ -3,16 +3,14 @@ Nick Mathewson ''' -import importlib.util +import importlib.machinery import sys from contextlib import contextmanager from textwrap import dedent from types import FunctionType, MethodType, BuiltinFunctionType import pyclbr -import importlib.machinery from unittest import TestCase, main as unittest_main from test.test_importlib import util as test_importlib_util - import warnings @@ -30,21 +28,23 @@ @contextmanager def temporary_main_spec(): """ - A context manager that temporarily sets the `__spec__` attribute + A context manager that temporarily sets the `__spec__` attribute of the `__main__` module if it's missing. """ - original_spec = getattr(sys.modules["__main__"], "__spec__", None) + main_mod = sys.modules.get("__main__") + if main_mod is None: + yield # Do nothing if __main__ is not present + return + + original_spec = getattr(main_mod, "__spec__", None) + if original_spec is None: + main_mod.__spec__ = importlib.machinery.ModuleSpec( + name="__main__", loader=None, origin="built-in" + ) try: - if original_spec is None: - sys.modules["__main__"].__spec__ = importlib.machinery.ModuleSpec( - name="__main__", loader=None, origin="built-in" - ) yield finally: - if original_spec is None: - del sys.modules["__main__"].__spec__ - else: - sys.modules["__main__"].__spec__ = original_spec + main_mod.__spec__ = original_spec class PyclbrTest(TestCase): From cd3f0bb1494cb9b96316e7873608146255e1b6e9 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 7 Apr 2025 18:50:43 +0300 Subject: [PATCH 15/18] removed test_pdb_module --- Lib/test/test_pyclbr.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py index 8840507bfd2c0a..cc21baf03332ad 100644 --- a/Lib/test/test_pyclbr.py +++ b/Lib/test/test_pyclbr.py @@ -240,19 +240,17 @@ def compare(parent1, children1, parent2, children2): compare(None, actual, None, expected) - def test_pdb_module(self): - with temporary_main_spec(): - self.checkModule( - 'pdb', - ignore=('_ModuleTarget', '_ScriptTarget', '_ZipTarget', 'Pdb'), - ) - def test_others(self): cm = self.checkModule # These were once some of the longest modules. cm('random', ignore=('Random',)) # from _random import Random as CoreGenerator cm('pickle', ignore=('partial', 'PickleBuffer')) + with temporary_main_spec(): + self.checkModule( + 'pdb', + ignore=('_ModuleTarget', '_ScriptTarget', '_ZipTarget', 'Pdb'), + ) with warnings.catch_warnings(): warnings.simplefilter('ignore', DeprecationWarning) cm('sre_parse', ignore=('dump', 'groups', 'pos')) # from sre_constants import *; property From 19e1a3ae3c6fbe5a26680cc94eabecb755132543 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 7 Apr 2025 19:07:43 +0300 Subject: [PATCH 16/18] changed the order of checks in the test_others function --- Lib/test/test_pyclbr.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py index cc21baf03332ad..6c1edb69f54131 100644 --- a/Lib/test/test_pyclbr.py +++ b/Lib/test/test_pyclbr.py @@ -246,15 +246,15 @@ def test_others(self): # These were once some of the longest modules. cm('random', ignore=('Random',)) # from _random import Random as CoreGenerator cm('pickle', ignore=('partial', 'PickleBuffer')) + with warnings.catch_warnings(): + warnings.simplefilter('ignore', DeprecationWarning) + cm('sre_parse', ignore=('dump', 'groups', 'pos')) # from sre_constants import *; property with temporary_main_spec(): - self.checkModule( + cm( 'pdb', ignore=('_ModuleTarget', '_ScriptTarget', '_ZipTarget', 'Pdb'), ) - with warnings.catch_warnings(): - warnings.simplefilter('ignore', DeprecationWarning) - cm('sre_parse', ignore=('dump', 'groups', 'pos')) # from sre_constants import *; property - cm('pydoc', ignore=('input', 'output',)) # properties + cm('pydoc', ignore=('input', 'output',)) # properties # Tests for modules inside packages cm('email.parser') From d12e5c64261dadc84452893b7586d626319aaa32 Mon Sep 17 00:00:00 2001 From: MaximGit1 Date: Mon, 7 Apr 2025 19:35:29 +0300 Subject: [PATCH 17/18] added comment and ignores --- Lib/test/test_pyclbr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py index 6c1edb69f54131..fd58a2e132c9bb 100644 --- a/Lib/test/test_pyclbr.py +++ b/Lib/test/test_pyclbr.py @@ -252,7 +252,8 @@ def test_others(self): with temporary_main_spec(): cm( 'pdb', - ignore=('_ModuleTarget', '_ScriptTarget', '_ZipTarget', 'Pdb'), + # pyclbr does not handle elegantly `typing` or properties + ignore=('Union', '_ModuleTarget', '_ScriptTarget', '_ZipTarget', 'curframe_locals', 'Pdb'), ) cm('pydoc', ignore=('input', 'output',)) # properties From 9e28fa4da9e461a045575f46733d5e69a3244ae4 Mon Sep 17 00:00:00 2001 From: Maksim <130899353+MaximGit1@users.noreply.github.com> Date: Mon, 7 Apr 2025 19:38:27 +0300 Subject: [PATCH 18/18] Update Lib/test/test_pyclbr.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --- Lib/test/test_pyclbr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py index fd58a2e132c9bb..a9ac13395a8fac 100644 --- a/Lib/test/test_pyclbr.py +++ b/Lib/test/test_pyclbr.py @@ -253,7 +253,7 @@ def test_others(self): cm( 'pdb', # pyclbr does not handle elegantly `typing` or properties - ignore=('Union', '_ModuleTarget', '_ScriptTarget', '_ZipTarget', 'curframe_locals', 'Pdb'), + ignore=('Union', '_ModuleTarget', '_ScriptTarget', '_ZipTarget', 'curframe_locals'), ) cm('pydoc', ignore=('input', 'output',)) # properties