Skip to content

Commit 19b259a

Browse files
committed
issue #549: skip Docker tests if Docker is unavailable
1 parent dcfd733 commit 19b259a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/testlib.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,11 @@ def _get_container_port(self):
427427
raise ValueError('could not find SSH port in: %r' % (s,))
428428

429429
def start_container(self):
430+
try:
431+
subprocess__check_output(['docker'])
432+
except Exception:
433+
raise unittest2.SkipTest('Docker binary is unavailable')
434+
430435
self.container_name = 'mitogen-test-%08x' % (random.getrandbits(64),)
431436
args = [
432437
'docker',

0 commit comments

Comments
 (0)