Author: Matti Picus <[email protected]>
Branch: win32-cleanup2
Changeset: r54942:63e17921879c
Date: 2012-05-07 20:17 +0300
http://bitbucket.org/pypy/pypy/changeset/63e17921879c/
Log: rework test (amaury_)
diff --git a/pypy/rpython/test/test_rbuiltin.py
b/pypy/rpython/test/test_rbuiltin.py
--- a/pypy/rpython/test/test_rbuiltin.py
+++ b/pypy/rpython/test/test_rbuiltin.py
@@ -201,12 +201,9 @@
os.close(res)
hello = open(tmpdir).read()
assert hello == "hello world"
- def throws(fname):
- fd = os.open(fname, os.O_WRONLY|os.O_CREAT, 777)
- os.close(fd)
- os.write(fd, "hello world")
- return fd
- raises(OSError, throws, tmpdir)
+ fd = os.open(tmpdir, os.O_WRONLY|os.O_CREAT, 777)
+ os.close(fd)
+ raises(OSError, os.write, fd, "hello world")
def test_os_write_single_char(self):
tmpdir = str(udir.udir.join("os_write_test_char"))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit