Author: Matti Picus <[email protected]>
Branch: 
Changeset: r92390:abca7cc0826b
Date: 2017-09-14 19:37 +0300
http://bitbucket.org/pypy/pypy/changeset/abca7cc0826b/

Log:    win32 tests almost pass untranslated, still have resource leak

diff --git a/pypy/module/_multiprocessing/test/test_connection.py 
b/pypy/module/_multiprocessing/test/test_connection.py
--- a/pypy/module/_multiprocessing/test/test_connection.py
+++ b/pypy/module/_multiprocessing/test/test_connection.py
@@ -12,6 +12,7 @@
                                   'itertools', 'select', 'struct', 'binascii']}
     if sys.platform == 'win32':
         spaceconfig['usemodules'].append('_rawffi')
+        spaceconfig['usemodules'].append('_cffi_backend')
     else:
         spaceconfig['usemodules'].append('fcntl')
 
@@ -39,6 +40,10 @@
 
 class BaseConnectionTest(object):
     def test_connection(self):
+        import sys
+        # if not translated, for win32
+        if not hasattr(sys, 'executable'):
+            sys.executable = 'from test_connection.py'
         rhandle, whandle = self.make_pair()
 
         whandle.send_bytes("abc")
@@ -50,6 +55,10 @@
         assert obj == obj2
 
     def test_poll(self):
+        import sys
+        # if not translated, for win32
+        if not hasattr(sys, 'executable'):
+            sys.executable = 'from test_connection.py'
         rhandle, whandle = self.make_pair()
 
         assert rhandle.poll() == False
@@ -64,6 +73,10 @@
 
     def test_read_into(self):
         import array, multiprocessing
+        import sys
+        # if not translated, for win32
+        if not hasattr(sys, 'executable'):
+            sys.executable = 'from test_connection.py'
         rhandle, whandle = self.make_pair()
 
         obj = [1, 2.0, "hello"]
@@ -81,6 +94,7 @@
     }
     if sys.platform == 'win32':
         spaceconfig['usemodules'].append('_rawffi')
+        spaceconfig['usemodules'].append('_cffi_backend')
 
     def setup_class(cls):
         if sys.platform != "win32":
@@ -109,6 +123,7 @@
     }
     if sys.platform == 'win32':
         spaceconfig['usemodules'].append('_rawffi')
+        spaceconfig['usemodules'].append('_cffi_backend')
     else:
         spaceconfig['usemodules'].append('fcntl')
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to