[pypy-commit] pypy release-pypy2.7-5.x: Win32: pass/skip a few tests

arigo pypy.commits at gmail.com
Wed Nov 9 03:50:41 EST 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: release-pypy2.7-5.x
Changeset: r88250:a129d217cb0f
Date: 2016-11-08 20:22 +0100
http://bitbucket.org/pypy/pypy/changeset/a129d217cb0f/

Log:	Win32: pass/skip a few tests

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
@@ -1157,12 +1157,19 @@
     def setup_class(cls):
         cls.w_path = space.wrap(str(path))
 
-    def test_environ(self):
-        import posix
-        assert posix.environ['PATH']
-        del posix.environ['PATH']
-        def fn(): posix.environ['PATH']
-        raises(KeyError, fn)
+    if sys.platform != 'win32':
+        def test_environ(self):
+            import posix
+            assert posix.environ['PATH']
+            del posix.environ['PATH']
+            def fn(): posix.environ['PATH']
+            raises(KeyError, fn)
+    else:
+        def test_environ(self):
+            import nt
+            assert 'ADLDJSSLDFKJSD' not in nt.environ
+            def fn(): nt.environ['ADLDJSSLDFKJSD']
+            raises(KeyError, fn)
 
     if hasattr(__import__(os.name), "unsetenv"):
         def test_unsetenv_nonexisting(self):
@@ -1184,6 +1191,8 @@
 
 class AppTestPosixUnicode:
     def setup_class(cls):
+        if sys.platform == 'win32':
+            py.test.skip("Posix-only tests")
         if cls.runappdirect:
             # Can't change encoding
             try:


More information about the pypy-commit mailing list