From 19b259a45f204eb70edfdb2f69d7d43fbeb7596f Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sat, 3 Aug 2019 05:48:47 +0100 Subject: [PATCH] issue #549: skip Docker tests if Docker is unavailable --- tests/testlib.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/testlib.py b/tests/testlib.py index 673d5ca6..d4387c54 100644 --- a/tests/testlib.py +++ b/tests/testlib.py @@ -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',