diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 8e004655088..34d5f76fd22 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -214,10 +214,10 @@ def testHostnameRes(self): if not fqhn in all_host_names: self.fail("Error testing host resolution mechanisms.") - def testJavaRef(self): + def testRefCountGetNameInfo(self): """Testing reference count for getnameinfo.""" import sys - if not sys.platform.startswith('java'): + if hasattr(sys, "getrefcount"): try: # On some versions, this loses a reference orig = sys.getrefcount(__name__)