Issue 19572: More silently skipped tests explicitly skipped.

This commit is contained in:
Zachary Ware 2013-12-08 00:20:35 -06:00
parent 774f909489
commit 9fe6d86709
34 changed files with 122 additions and 134 deletions

View file

@ -195,7 +195,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
@ -209,7 +209,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)
@ -274,7 +274,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
@ -378,7 +378,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):
@ -434,7 +434,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)
@ -462,7 +462,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)
@ -671,7 +671,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)
@ -779,7 +779,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)
@ -1399,7 +1399,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)
@ -1694,7 +1694,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')
@ -2188,7 +2188,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()