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:
commit
101d9e7250
35 changed files with 135 additions and 142 deletions
|
@ -198,7 +198,7 @@ class _TestProcess(BaseTestCase):
|
|||
|
||||
def test_current(self):
|
||||
if self.TYPE == 'threads':
|
||||
return
|
||||
self.skipTest('test not appropriate for {}'.format(self.TYPE))
|
||||
|
||||
current = self.current_process()
|
||||
authkey = current.authkey
|
||||
|
@ -212,7 +212,7 @@ class _TestProcess(BaseTestCase):
|
|||
|
||||
def test_daemon_argument(self):
|
||||
if self.TYPE == "threads":
|
||||
return
|
||||
self.skipTest('test not appropriate for {}'.format(self.TYPE))
|
||||
|
||||
# By default uses the current process's daemon flag.
|
||||
proc0 = self.Process(target=self._test)
|
||||
|
@ -277,7 +277,7 @@ class _TestProcess(BaseTestCase):
|
|||
|
||||
def test_terminate(self):
|
||||
if self.TYPE == 'threads':
|
||||
return
|
||||
self.skipTest('test not appropriate for {}'.format(self.TYPE))
|
||||
|
||||
p = self.Process(target=self._test_terminate)
|
||||
p.daemon = True
|
||||
|
@ -385,7 +385,7 @@ class _TestProcess(BaseTestCase):
|
|||
|
||||
def test_sentinel(self):
|
||||
if self.TYPE == "threads":
|
||||
return
|
||||
self.skipTest('test not appropriate for {}'.format(self.TYPE))
|
||||
event = self.Event()
|
||||
p = self.Process(target=self._test_sentinel, args=(event,))
|
||||
with self.assertRaises(ValueError):
|
||||
|
@ -441,7 +441,7 @@ class _TestSubclassingProcess(BaseTestCase):
|
|||
def test_stderr_flush(self):
|
||||
# sys.stderr is flushed at process shutdown (issue #13812)
|
||||
if self.TYPE == "threads":
|
||||
return
|
||||
self.skipTest('test not appropriate for {}'.format(self.TYPE))
|
||||
|
||||
testfn = test.support.TESTFN
|
||||
self.addCleanup(test.support.unlink, testfn)
|
||||
|
@ -469,7 +469,7 @@ class _TestSubclassingProcess(BaseTestCase):
|
|||
def test_sys_exit(self):
|
||||
# See Issue 13854
|
||||
if self.TYPE == 'threads':
|
||||
return
|
||||
self.skipTest('test not appropriate for {}'.format(self.TYPE))
|
||||
|
||||
testfn = test.support.TESTFN
|
||||
self.addCleanup(test.support.unlink, testfn)
|
||||
|
@ -678,7 +678,7 @@ class _TestQueue(BaseTestCase):
|
|||
try:
|
||||
self.assertEqual(q.qsize(), 0)
|
||||
except NotImplementedError:
|
||||
return
|
||||
self.skipTest('qsize method not implemented')
|
||||
q.put(1)
|
||||
self.assertEqual(q.qsize(), 1)
|
||||
q.put(5)
|
||||
|
@ -786,7 +786,7 @@ class _TestSemaphore(BaseTestCase):
|
|||
|
||||
def test_timeout(self):
|
||||
if self.TYPE != 'processes':
|
||||
return
|
||||
self.skipTest('test not appropriate for {}'.format(self.TYPE))
|
||||
|
||||
sem = self.Semaphore(0)
|
||||
acquire = TimingWrapper(sem.acquire)
|
||||
|
@ -1406,7 +1406,7 @@ class _TestBarrier(BaseTestCase):
|
|||
|
||||
def test_thousand(self):
|
||||
if self.TYPE == 'manager':
|
||||
return
|
||||
self.skipTest('test not appropriate for {}'.format(self.TYPE))
|
||||
passes = 1000
|
||||
lock = self.Lock()
|
||||
conn, child_conn = self.Pipe(False)
|
||||
|
@ -1701,7 +1701,7 @@ class _TestPool(BaseTestCase):
|
|||
def test_map_unplicklable(self):
|
||||
# Issue #19425 -- failure to pickle should not cause a hang
|
||||
if self.TYPE == 'threads':
|
||||
return
|
||||
self.skipTest('test not appropriate for {}'.format(self.TYPE))
|
||||
class A(object):
|
||||
def __reduce__(self):
|
||||
raise RuntimeError('cannot pickle')
|
||||
|
@ -2224,7 +2224,7 @@ class _TestConnection(BaseTestCase):
|
|||
|
||||
def test_sendbytes(self):
|
||||
if self.TYPE != 'processes':
|
||||
return
|
||||
self.skipTest('test not appropriate for {}'.format(self.TYPE))
|
||||
|
||||
msg = latin('abcdefghijklmnopqrstuvwxyz')
|
||||
a, b = self.Pipe()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue