https://github.com/python/cpython/commit/0f6bb28ff3ba152faf7523ea9aaf0094cc39bdda
commit: 0f6bb28ff3ba152faf7523ea9aaf0094cc39bdda
branch: main
author: CF Bolz-Tereick <[email protected]>
committer: Eclips4 <[email protected]>
date: 2024-11-10T17:16:36+02:00
summary:
Skip test in test_socket.py if `sys.getrefcount` isn't available (#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`.
files:
M Lib/test/test_socket.py
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index f2bc52ba6e8701..dc8a4a44f37e65 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -5334,6 +5334,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]