Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 284a2cf

Browse files
committed
Don't test for Java, test for sys.getrefcount.
1 parent 1c93801 commit 284a2cf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_socket.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,10 @@ def testHostnameRes(self):
214214
if not fqhn in all_host_names:
215215
self.fail("Error testing host resolution mechanisms.")
216216

217-
def testJavaRef(self):
217+
def testRefCountGetNameInfo(self):
218218
"""Testing reference count for getnameinfo."""
219219
import sys
220-
if not sys.platform.startswith('java'):
220+
if hasattr(sys, "getrefcount"):
221221
try:
222222
# On some versions, this loses a reference
223223
orig = sys.getrefcount(__name__)

0 commit comments

Comments
 (0)