Issue #19572: More silently skipped tests explicitly skipped.
diff --git a/Lib/test/test_macos.py b/Lib/test/test_macos.py
index 5af5105..0956d1d 100644
--- a/Lib/test/test_macos.py
+++ b/Lib/test/test_macos.py
@@ -8,11 +8,9 @@
TESTFN2 = test_support.TESTFN + '2'
class TestMacOS(unittest.TestCase):
-
+ @unittest.skipUnless(os.path.exists('/Developer/Tools/SetFile'),
+ '/Developer/Tools/SetFile does not exist')
def testGetCreatorAndType(self):
- if not os.path.exists('/Developer/Tools/SetFile'):
- return
-
try:
fp = open(test_support.TESTFN, 'w')
fp.write('\n')
@@ -29,10 +27,9 @@
finally:
os.unlink(test_support.TESTFN)
+ @unittest.skipUnless(os.path.exists('/Developer/Tools/GetFileInfo'),
+ '/Developer/Tools/GetFileInfo does not exist')
def testSetCreatorAndType(self):
- if not os.path.exists('/Developer/Tools/GetFileInfo'):
- return
-
try:
fp = open(test_support.TESTFN, 'w')
fp.write('\n')