[pypy-commit] pypy default: Skip some tests when the function under test is unavailable (e.g. on Windows)

rlamy pypy.commits at gmail.com
Thu Apr 7 12:11:11 EDT 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: 
Changeset: r83576:56eb64398864
Date: 2016-04-07 17:10 +0100
http://bitbucket.org/pypy/pypy/changeset/56eb64398864/

Log:	Skip some tests when the function under test is unavailable (e.g. on
	Windows)

diff --git a/rpython/rlib/test/test_rposix.py b/rpython/rlib/test/test_rposix.py
--- a/rpython/rlib/test/test_rposix.py
+++ b/rpython/rlib/test/test_rposix.py
@@ -488,6 +488,7 @@
             os.close(dirfd)
         assert not os.path.exists(self.ufilename)
 
+    @rposix_requires('utimensat')
     def test_utimensat(self):
         def f(dirfd):
             return rposix.utimensat('test_open_ascii',
@@ -499,6 +500,7 @@
         finally:
             os.close(dirfd)
 
+    @rposix_requires('fchmodat')
     def test_fchmodat(self):
         def f(dirfd):
             return rposix.fchmodat('test_open_ascii', 0777, dirfd)
@@ -529,6 +531,7 @@
         compile(f, ())
 
 
+ at rposix_requires('fdlistdir')
 def test_fdlistdir(tmpdir):
     tmpdir.join('file').write('text')
     dirfd = os.open(str(tmpdir), os.O_RDONLY)
@@ -536,6 +539,7 @@
     # Note: fdlistdir() always closes dirfd
     assert result == ['file']
 
+ at rposix_requires('symlinkat')
 def test_symlinkat(tmpdir):
     tmpdir.join('file').write('text')
     dirfd = os.open(str(tmpdir), os.O_RDONLY)
@@ -545,6 +549,7 @@
     finally:
         os.close(dirfd)
 
+ at rposix_requires('renameat')
 def test_renameat(tmpdir):
     tmpdir.join('file').write('text')
     dirfd = os.open(str(tmpdir), os.O_RDONLY)


More information about the pypy-commit mailing list