https://github.com/python/cpython/commit/c47c6416c3614f5a58f5d4fd86714ed4b6bd60c4 commit: c47c6416c3614f5a58f5d4fd86714ed4b6bd60c4 branch: 3.12 author: Miss Islington (bot) <[email protected]> committer: Eclips4 <[email protected]> date: 2024-11-10T15:34:52Z summary:
[3.12] Skip test in test_socket.py if `sys.getrefcount` isn't available (GH-126640) (#126646) Skip test in test_socket.py if `sys.getrefcount` isn't available (GH-126640) Skip `testMakefileCloseSocketDestroy` test if `sys.getrefcount` isn't available. This is necessary for PyPy and other Python implementations that do not have `sys.getrefcount`. (cherry picked from commit 0f6bb28ff3ba152faf7523ea9aaf0094cc39bdda) Co-authored-by: CF Bolz-Tereick <[email protected]> files: M Lib/test/test_socket.py diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index acfa1cd503b86b..fd328a74134bcf 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -5261,6 +5261,8 @@ def _testMakefileClose(self): self.write_file.write(self.write_msg) self.write_file.flush() + @unittest.skipUnless(hasattr(sys, 'getrefcount'), + 'test needs sys.getrefcount()') def testMakefileCloseSocketDestroy(self): refcount_before = sys.getrefcount(self.cli_conn) self.read_file.close() _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
