Issue #19572: More silently skipped tests explicitly skipped.
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index dd0696e..3a145f1 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -134,7 +134,6 @@
self.assertEqual(first.args, second.args)
else:
self.fail("expected os.tmpfile() to raise OSError")
- return
else:
# open() worked, therefore, tmpfile() should work. Close our
# dummy file and proceed with the test as normal.
@@ -258,7 +257,7 @@
except OSError, e:
# On AtheOS, glibc always returns ENOSYS
if e.errno == errno.ENOSYS:
- return
+ self.skipTest('glibc always returns ENOSYS on AtheOS')
# Make sure direct access works
self.assertEqual(result.f_bfree, result[3])
@@ -338,7 +337,7 @@
os.stat(r"c:\pagefile.sys")
except WindowsError, e:
if e.errno == 2: # file does not exist; cannot run test
- return
+ self.skipTest(r'c:\pagefile.sys does not exist')
self.fail("Could not stat pagefile.sys")
from test import mapping_tests