Refcounting isn't available in Jython. Putting the jython test around it.
This closes patch "[ #490414 ] Jython and test_socket".
This commit is contained in:
parent
0f2d4b84a6
commit
ada1983950
|
@ -90,14 +90,15 @@ if hasattr(socket, 'getservbyname'):
|
||||||
except socket.error:
|
except socket.error:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
import sys
|
||||||
# On some versions, this loses a reference
|
if not sys.platform.startswith('java'):
|
||||||
import sys
|
try:
|
||||||
orig = sys.getrefcount(__name__)
|
# On some versions, this loses a reference
|
||||||
socket.getnameinfo(__name__,0)
|
orig = sys.getrefcount(__name__)
|
||||||
except SystemError:
|
socket.getnameinfo(__name__,0)
|
||||||
if sys.getrefcount(__name__) <> orig:
|
except SystemError:
|
||||||
raise TestFailed,"socket.getnameinfo loses a reference"
|
if sys.getrefcount(__name__) <> orig:
|
||||||
|
raise TestFailed,"socket.getnameinfo loses a reference"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# On some versions, this crashes the interpreter.
|
# On some versions, this crashes the interpreter.
|
||||||
|
|
Loading…
Reference in New Issue