Author: Christian Tismer <tis...@stackless.com>
Branch: win64_gborg
Changeset: r48982:dc98b8e33da9
Date: 2011-11-09 03:32 +0100
http://bitbucket.org/pypy/pypy/changeset/dc98b8e33da9/

Log:    test_posix: test_isatty 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
@@ -1317,7 +1317,7 @@
         os_isatty = self.llexternal(underscore_on_windows+'isatty', 
[rffi.INT], rffi.INT)
 
         def isatty_llimpl(fd):
-            res = rffi.cast(rffi.LONG, os_isatty(rffi.cast(rffi.INT, fd)))
+            res = rffi.cast(lltype.Signed, os_isatty(rffi.cast(rffi.INT, fd)))
             return res != 0
 
         return extdef([int], bool, llimpl=isatty_llimpl,
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
@@ -65,21 +65,21 @@
 
 
     def test_lseek(self):
-        def f(fi,pos):
-            posix.lseek(fi,pos,0)
-        fi = os.open(path,os.O_RDONLY,0777)
-        func = self.interpret(f,[fi,5]) 
-        res = os.read(fi,2)
+        def f(fi, pos):
+            posix.lseek(fi, pos, 0)
+        fi = os.open(path, os.O_RDONLY, 0777)
+        func = self.interpret(f, [fi, 5]) 
+        res = os.read(fi, 2)
         assert res =='is'
 
     def test_isatty(self):
         def f(fi):
             posix.isatty(fi)
-        fi = os.open(path,os.O_RDONLY,0777)
-        func = self.interpret(f,[fi])
+        fi = os.open(path, os.O_RDONLY, 0777)
+        func = self.interpret(f, [fi])
         assert not func
         os.close(fi)
-        func = self.interpret(f,[fi])
+        func = self.interpret(f, [fi])
         assert not func
 
     def test_getcwd(self):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to