summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorFinn Bock <bckfnn@worldonline.dk>2001-12-09 08:57:46 (GMT)
committerFinn Bock <bckfnn@worldonline.dk>2001-12-09 08:57:46 (GMT)
commitada1983950395e640020535513eb086b6314f0f2 (patch)
tree380faa43fcb514bf895040f143b5a60ff0dd5f67 /Lib
parent0f2d4b84a60e6064640f09c8010dedeaa9453f14 (diff)
downloadcpython-ada1983950395e640020535513eb086b6314f0f2.zip
cpython-ada1983950395e640020535513eb086b6314f0f2.tar.gz
cpython-ada1983950395e640020535513eb086b6314f0f2.tar.bz2
Refcounting isn't available in Jython. Putting the jython test around it.
This closes patch "[ #490414 ] Jython and test_socket".
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_socket.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 4269ef8..9cef316 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -90,14 +90,15 @@ if hasattr(socket, 'getservbyname'):
except socket.error:
pass
-try:
- # On some versions, this loses a reference
- import sys
- orig = sys.getrefcount(__name__)
- socket.getnameinfo(__name__,0)
-except SystemError:
- if sys.getrefcount(__name__) <> orig:
- raise TestFailed,"socket.getnameinfo loses a reference"
+import sys
+if not sys.platform.startswith('java'):
+ try:
+ # On some versions, this loses a reference
+ orig = sys.getrefcount(__name__)
+ socket.getnameinfo(__name__,0)
+ except SystemError:
+ if sys.getrefcount(__name__) <> orig:
+ raise TestFailed,"socket.getnameinfo loses a reference"
try:
# On some versions, this crashes the interpreter.