Author: Matti Picus <matti.pi...@gmail.com> Branch: py3.5 Changeset: r92632:724034639995 Date: 2017-10-08 00:17 +1100 http://bitbucket.org/pypy/pypy/changeset/724034639995/
Log: fix for win32 posix => os diff --git a/pypy/module/_socket/test/test_sock_app.py b/pypy/module/_socket/test/test_sock_app.py --- a/pypy/module/_socket/test/test_sock_app.py +++ b/pypy/module/_socket/test/test_sock_app.py @@ -560,14 +560,14 @@ s.ioctl(_socket.SIO_KEEPALIVE_VALS, (1, 100, 100)) def test_dup(self): - import _socket as socket, posix + import _socket as socket, os s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(('localhost', 0)) fd = socket.dup(s.fileno()) assert s.fileno() != fd - assert posix.get_inheritable(s.fileno()) is False - assert posix.get_inheritable(fd) is False - posix.close(fd) + assert os.get_inheritable(s.fileno()) is False + assert os.get_inheritable(fd) is False + os.close(fd) s.close() def test_dup_error(self): @@ -682,18 +682,18 @@ raises(ValueError, _socket.socket, fileno=-1) def test_socket_non_inheritable(self): - import _socket, posix + import _socket, os s1 = _socket.socket() - assert posix.get_inheritable(s1.fileno()) is False + assert os.get_inheritable(s1.fileno()) is False s1.close() def test_socketpair_non_inheritable(self): - import _socket, posix + import _socket, os if not hasattr(_socket, 'socketpair'): skip("no socketpair") s1, s2 = _socket.socketpair() - assert posix.get_inheritable(s1.fileno()) is False - assert posix.get_inheritable(s2.fileno()) is False + assert os.get_inheritable(s1.fileno()) is False + assert os.get_inheritable(s2.fileno()) is False s1.close() s2.close() @@ -887,12 +887,12 @@ def test_accept_non_inheritable(self): - import _socket, posix + import _socket, os cli = _socket.socket() cli.connect(self.serv.getsockname()) fileno, addr = self.serv._accept() - assert posix.get_inheritable(fileno) is False - posix.close(fileno) + assert os.get_inheritable(fileno) is False + os.close(fileno) cli.close() def test_recv_into_params(self): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit