Commit 84e7e5f4 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Skip test for issue #17976 if /dev/null is not available.

parent 6d562319
......@@ -418,10 +418,16 @@ class OtherFileTests(unittest.TestCase):
@unittest.skipUnless(os.name == 'posix', 'test requires a posix system.')
def test_write_full(self):
# Issue #17976
with open('/dev/full', 'w', 1) as f:
try:
f = open('/dev/full', 'w', 1)
except IOError:
self.skipTest("requires '/dev/full'")
try:
with self.assertRaises(IOError):
f.write('hello')
f.write('\n')
finally:
f.close()
class FileSubclassTests(unittest.TestCase):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment