[pypy-commit] pypy testing-cleanup-py3k: Blindly try to get tests to pass on bencher4

rlamy pypy.commits at gmail.com
Fri Jun 10 12:31:33 EDT 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: testing-cleanup-py3k
Changeset: r85080:dc234c6c4b34
Date: 2016-06-10 17:30 +0100
http://bitbucket.org/pypy/pypy/changeset/dc234c6c4b34/

Log:	Blindly try to get tests to pass on bencher4

diff --git a/pypy/module/posix/test/test_posix2.py b/pypy/module/posix/test/test_posix2.py
--- a/pypy/module/posix/test/test_posix2.py
+++ b/pypy/module/posix/test/test_posix2.py
@@ -1183,6 +1183,7 @@
 
 class AppTestPosixUnicode:
     def setup_class(cls):
+        cls.w_posix = cls.space.appexec([], GET_POSIX)
         if cls.runappdirect:
             # Can't change encoding
             try:
@@ -1201,25 +1202,22 @@
 
     def test_stat_unicode(self):
         # test that passing unicode would not raise UnicodeDecodeError
-        import posix
         try:
-            posix.stat(u"ą")
+            self.posix.stat(u"ą")
         except OSError:
             pass
 
     def test_open_unicode(self):
         # Ensure passing unicode doesn't raise UnicodeEncodeError
-        import posix
         try:
-            posix.open(u"ą", posix.O_WRONLY)
+            self.posix.open(u"ą", self.posix.O_WRONLY)
         except OSError:
             pass
 
     def test_remove_unicode(self):
         # See 2 above ;)
-        import posix
         try:
-            posix.remove(u"ą")
+            self.posix.remove(u"ą")
         except OSError:
             pass
 


More information about the pypy-commit mailing list