mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue 19572: More silently skipped tests explicitly skipped.
This commit is contained in:
parent
774f909489
commit
9fe6d86709
34 changed files with 122 additions and 134 deletions
|
@ -324,10 +324,9 @@ class TestMkstempInner(BaseTestCase):
|
|||
finally:
|
||||
os.rmdir(dir)
|
||||
|
||||
@unittest.skipUnless(has_stat, 'os.stat not available')
|
||||
def test_file_mode(self):
|
||||
# _mkstemp_inner creates files with the proper mode
|
||||
if not has_stat:
|
||||
return # ugh, can't use SkipTest.
|
||||
|
||||
file = self.do_create()
|
||||
mode = stat.S_IMODE(os.stat(file.name).st_mode)
|
||||
|
@ -339,10 +338,9 @@ class TestMkstempInner(BaseTestCase):
|
|||
expected = user * (1 + 8 + 64)
|
||||
self.assertEqual(mode, expected)
|
||||
|
||||
@unittest.skipUnless(has_spawnl, 'os.spawnl not available')
|
||||
def test_noinherit(self):
|
||||
# _mkstemp_inner file handles are not inherited by child processes
|
||||
if not has_spawnl:
|
||||
return # ugh, can't use SkipTest.
|
||||
|
||||
if support.verbose:
|
||||
v="v"
|
||||
|
@ -377,10 +375,9 @@ class TestMkstempInner(BaseTestCase):
|
|||
"child process caught fatal signal %d" % -retval)
|
||||
self.assertFalse(retval > 0, "child process reports failure %d"%retval)
|
||||
|
||||
@unittest.skipUnless(has_textmode, "text mode not available")
|
||||
def test_textmode(self):
|
||||
# _mkstemp_inner can create files in text mode
|
||||
if not has_textmode:
|
||||
return # ugh, can't use SkipTest.
|
||||
|
||||
# A text file is truncated at the first Ctrl+Z byte
|
||||
f = self.do_create(bin=0)
|
||||
|
@ -556,10 +553,9 @@ class TestMkdtemp(BaseTestCase):
|
|||
finally:
|
||||
os.rmdir(dir)
|
||||
|
||||
@unittest.skipUnless(has_stat, 'os.stat not available')
|
||||
def test_mode(self):
|
||||
# mkdtemp creates directories with the proper mode
|
||||
if not has_stat:
|
||||
return # ugh, can't use SkipTest.
|
||||
|
||||
dir = self.do_create()
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue