def test_access(self): filename = str(udir.join('test_access.txt')) fd = file(filename, 'w') fd.close() for mode in os.R_OK, os.W_OK, os.X_OK, os.R_OK | os.W_OK | os.X_OK: result = rposix.access(filename, mode) assert result == os.access(filename, mode)
def f(): return rposix.access(self.path, os.R_OK)