[pypy-commit] pypy superjumbo: solving typos in test_rposix.py

nanjekye pypy.commits at gmail.com
Sun Apr 2 05:03:45 EDT 2017


Author: Joannah Nanjekye <nanjekyejoannah at gmail.com>
Branch: superjumbo
Changeset: r90916:02d3198db10f
Date: 2017-04-01 17:03 +0300
http://bitbucket.org/pypy/pypy/changeset/02d3198db10f/

Log:	solving typos in test_rposix.py

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
@@ -752,25 +752,24 @@
     py.test.raises(OSError, rposix.pwrite, fd, b'ea', 1)
 
 @rposix_requires('posix_fadvise')
-def posix_fadvise():
+def test_posix_fadvise():
     fname = str(udir.join('test_os_posix_fadvise'))
     localdir = os.getcwd()
-    os.mkdir(self.path2 + 'test_os_posix_fadvise')
+    os.mkdir(fname)
     try:
         fd = os.open(fname, os.O_RDONLY, 0777)
         try:
             mypath = os.getcwd()
             assert rposix.posix_fadvise(fd, 0, 0, rposix.POSIX_FADV_WILLNEED) == 0
             assert rposix.posix_fadvise(fd, 0, 0, rposix.POSIX_FADV_NORMAL) == 0
-            assert rposix.posix_fadvise(fd, 0, 0, rPOSIX_FADV_SEQUENTIAL) == 0
+            assert rposix.posix_fadvise(fd, 0, 0, rposix.POSIX_FADV_SEQUENTIAL) == 0
             assert rposix.posix_fadvise(fd, 0, 0, rposix.POSIX_FADV_RANDOM) == 0
             assert rposix.posix_fadvise(fd, 0, 0, rposix.POSIX_FADV_NOREUSE) == 0
-            assert rposix.posix_fadvise(fd, 0, 0, rPOSIX_FADV_DONTNEED) == 0
+            assert rposix.posix_fadvise(fd, 0, 0, rposix.POSIX_FADV_DONTNEED) == 0
         finally:
             os.close(fd)
     finally:
         os.chdir(localdir)
-    py.test.raises(OSError, rposix.posix_fadvise, fd, 0, 0, rPOSIX_FADV_DONTNEED)
 
 @rposix_requires('posix_fallocate')
 def test_posix_fallocate():


More information about the pypy-commit mailing list