[pypy-svn] r48522 - in pypy/branch/unicode-objspace/pypy/rlib: . test

fijal at codespeak.net fijal at codespeak.net
Sat Nov 10 18:30:06 CET 2007


Author: fijal
Date: Sat Nov 10 18:30:05 2007
New Revision: 48522

Modified:
   pypy/branch/unicode-objspace/pypy/rlib/rsocket.py
   pypy/branch/unicode-objspace/pypy/rlib/test/test_rsocket.py
Log:
* Fix rpython warnings
* Fix test (might be 'www' instead of 'http')


Modified: pypy/branch/unicode-objspace/pypy/rlib/rsocket.py
==============================================================================
--- pypy/branch/unicode-objspace/pypy/rlib/rsocket.py	(original)
+++ pypy/branch/unicode-objspace/pypy/rlib/rsocket.py	Sat Nov 10 18:30:05 2007
@@ -128,6 +128,11 @@
         raise RSocketError("unknown address family")
     from_object = staticmethod(from_object)
 
+    def fill_from_object(self, space, w_address):
+        """ Purely abstract
+        """
+        raise NotImplementedError
+
 # ____________________________________________________________
 
 def makeipaddr(name, result=None):
@@ -189,6 +194,11 @@
         host, serv = getnameinfo(self, NI_NUMERICHOST | NI_NUMERICSERV)
         return host
 
+    def lock_in_addr(self):
+        """ Purely abstract
+        """
+        raise NotImplementedError
+
 # ____________________________________________________________
 
 class INETAddress(IPAddress):

Modified: pypy/branch/unicode-objspace/pypy/rlib/test/test_rsocket.py
==============================================================================
--- pypy/branch/unicode-objspace/pypy/rlib/test/test_rsocket.py	(original)
+++ pypy/branch/unicode-objspace/pypy/rlib/test/test_rsocket.py	Sat Nov 10 18:30:05 2007
@@ -1,6 +1,7 @@
 import py, errno, sys
 from pypy.rlib import rsocket
 from pypy.rlib.rsocket import *
+import socket as cpy_socket
 
 # cannot test error codes in Win32 because ll2ctypes doesn't save
 # the errors that WSAGetLastError() should return, making it likely
@@ -80,8 +81,8 @@
     assert getservbyname('http', 'tcp') == 80
 
 def test_getservbyport():
-    assert getservbyport(80) == 'http'
-    assert getservbyport(80, 'tcp') == 'http'
+    assert getservbyport(80) == cpy_socket.getservbyport(80)
+    assert getservbyport(80, 'tcp') == cpy_socket.getservbyport(80)
 
 def test_getprotobyname():
     assert getprotobyname('tcp') == IPPROTO_TCP



More information about the Pypy-commit mailing list