[3.12] gh-105063: Disable test_peg_generator.TestCParser bco. ref leaks (GH-106024) (#106450)

Since gh-104798 (Use setuptools in peg-generator and reenable
tests), the TestCParser test case has been producing ref leaks.
(cherry picked from commit 41ad4dfc04)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
Miss Islington (bot) 2023-07-05 04:05:50 -07:00 committed by GitHub
parent 53605f285a
commit b314194c3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,8 +74,18 @@ unittest.main()
@support.requires_subprocess() @support.requires_subprocess()
class TestCParser(unittest.TestCase): class TestCParser(unittest.TestCase):
_has_run = False
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
if cls._has_run:
# Since gh-104798 (Use setuptools in peg-generator and reenable
# tests), this test case has been producing ref leaks. Initial
# debugging points to bug(s) in setuptools and/or importlib.
# See gh-105063 for more info.
raise unittest.SkipTest("gh-105063: can not rerun because of ref. leaks")
cls._has_run = True
# When running under regtest, a separate tempdir is used # When running under regtest, a separate tempdir is used
# as the current directory and watched for left-overs. # as the current directory and watched for left-overs.
# Reusing that as the base for temporary directories # Reusing that as the base for temporary directories