Author: Ronan Lamy <ronan.l...@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"&#261;")
+            self.posix.stat(u"&#261;")
         except OSError:
             pass
 
     def test_open_unicode(self):
         # Ensure passing unicode doesn't raise UnicodeEncodeError
-        import posix
         try:
-            posix.open(u"&#261;", posix.O_WRONLY)
+            self.posix.open(u"&#261;", self.posix.O_WRONLY)
         except OSError:
             pass
 
     def test_remove_unicode(self):
         # See 2 above ;)
-        import posix
         try:
-            posix.remove(u"&#261;")
+            self.posix.remove(u"&#261;")
         except OSError:
             pass
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to