Author: Christian Tismer <tis...@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): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit