[pypy-commit] pypy win64_gborg: test_posix: test_open works
ctismer
noreply at buildbot.pypy.org
Wed Nov 9 03:21:42 CET 2011
Author: Christian Tismer <tismer at stackless.com>
Branch: win64_gborg
Changeset: r48981:d8a8d1ed4a04
Date: 2011-11-09 03:21 +0100
http://bitbucket.org/pypy/pypy/changeset/d8a8d1ed4a04/
Log: test_posix: test_open works
diff --git a/pypy/rpython/module/ll_os.py b/pypy/rpython/module/ll_os.py
--- a/pypy/rpython/module/ll_os.py
+++ b/pypy/rpython/module/ll_os.py
@@ -791,7 +791,7 @@
[traits.CCHARP, rffi.INT, rffi.MODE_T],
rffi.INT)
def os_open_llimpl(path, flags, mode):
- result = rffi.cast(rffi.LONG, os_open(path, flags, mode))
+ result = rffi.cast(lltype.Signed, os_open(path, flags, mode))
if result == -1:
raise OSError(rposix.get_errno(), "os_open failed")
return result
diff --git a/pypy/rpython/module/test/test_posix.py b/pypy/rpython/module/test/test_posix.py
--- a/pypy/rpython/module/test/test_posix.py
+++ b/pypy/rpython/module/test/test_posix.py
@@ -18,10 +18,10 @@
def test_open(self):
def f():
- ff = posix.open(path,posix.O_RDONLY,0777)
+ ff = posix.open(path, posix.O_RDONLY, 0777)
return ff
- func = self.interpret(f,[])
- assert type(func) == int
+ func = self.interpret(f, [])
+ assert isinstance(func, (int, long))
def test_fstat(self):
def fo(fi):
More information about the pypy-commit
mailing list