From: Guido van Rossum Date: Wed, 12 Jun 2002 21:19:40 +0000 (+0000) Subject: Don't test for Java, test for sys.getrefcount. X-Git-Tag: v2.3c1~5362 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=284a2cf07fe3cf8d8acdd8cbb1d3e6a357dff662;p=python Don't test for Java, test for sys.getrefcount. --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 8e00465508..34d5f76fd2 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -214,10 +214,10 @@ class GeneralModuleTests(unittest.TestCase): 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__)