[pypy-svn] r76945 - pypy/trunk/pypy/rpython/lltypesystem/test
afa at codespeak.net
afa at codespeak.net
Wed Sep 8 15:37:58 CEST 2010
Author: afa
Date: Wed Sep 8 15:37:56 2010
New Revision: 76945
Modified:
pypy/trunk/pypy/rpython/lltypesystem/test/test_rffi.py
Log:
Fix test_rffi on Windows, which aborts() in os.write when an invalid fd is used.
Use a non-writable file instead.
Modified: pypy/trunk/pypy/rpython/lltypesystem/test/test_rffi.py
==============================================================================
--- pypy/trunk/pypy/rpython/lltypesystem/test/test_rffi.py (original)
+++ pypy/trunk/pypy/rpython/lltypesystem/test/test_rffi.py Wed Sep 8 15:37:56 2010
@@ -186,6 +186,11 @@
def test_externvar(self):
import os
+ if os.name == 'nt':
+ # Windows CRT badly aborts when an invalid fd is used.
+ bad_fd = 0
+ else:
+ bad_fd = 12312312
def f():
set_errno(12)
@@ -193,7 +198,7 @@
def g():
try:
- os.write(12312312, "xxx")
+ os.write(bad_fd, "xxx")
except OSError:
pass
return get_errno()
More information about the Pypy-commit
mailing list