[pypy-commit] pypy use-file-star-for-file: skip /dev/full tests better
bdkearns
noreply at buildbot.pypy.org
Fri Sep 12 20:36:07 CEST 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch: use-file-star-for-file
Changeset: r73511:9227e33346d4
Date: 2014-09-12 11:35 -0700
http://bitbucket.org/pypy/pypy/changeset/9227e33346d4/
Log: skip /dev/full tests better
diff --git a/pypy/module/_file/test/test_file.py b/pypy/module/_file/test/test_file.py
--- a/pypy/module/_file/test/test_file.py
+++ b/pypy/module/_file/test/test_file.py
@@ -267,11 +267,9 @@
with self.file(self.temppath, 'r') as f:
raises(IOError, f.truncate, 100)
+ @py.test.mark.skipif("not os.path.exists('/dev/full')")
def test_write_full_regular(self):
- try:
- f = self.file('/dev/full', 'w', 1)
- except IOError:
- skip("requires '/dev/full'")
+ f = self.file('/dev/full', 'w', 1)
try:
f.write('hello')
raises(IOError, f.write, '\n')
@@ -281,13 +279,11 @@
finally:
f.close()
+ @py.test.mark.skipif("not os.path.exists('/dev/full')")
def test_write_full_fdopen(self):
import os
fd = os.open('/dev/full', os.O_WRONLY)
- try:
- f = os.fdopen(fd, 'w', 1)
- except IOError:
- skip("requires '/dev/full'")
+ f = os.fdopen(fd, 'w', 1)
try:
f.write('hello')
raises(IOError, f.write, '\n')
More information about the pypy-commit
mailing list