issue #549: skip Docker tests if Docker is unavailable

This commit is contained in:
David Wilson 2019-08-03 05:48:47 +01:00
parent dcfd733e6f
commit 19b259a45f
1 changed files with 5 additions and 0 deletions

View File

@ -427,6 +427,11 @@ class DockerizedSshDaemon(object):
raise ValueError('could not find SSH port in: %r' % (s,))
def start_container(self):
try:
subprocess__check_output(['docker'])
except Exception:
raise unittest2.SkipTest('Docker binary is unavailable')
self.container_name = 'mitogen-test-%08x' % (random.getrandbits(64),)
args = [
'docker',