diff options
-rw-r--r-- | tests/test_config.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index 5e9aa059..2095061f 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -6,7 +6,11 @@ from socket import gaierror from paramiko.py3compat import string_types -from invoke import Result +try: + from invoke import Result +except ImportError: + Result = None + from mock import patch from pytest import raises, mark, fixture @@ -705,6 +709,7 @@ def _expect(success_on): return inner +@mark.skipif(Result is None, reason="requires invoke package") class TestMatchExec(object): @patch("paramiko.config.invoke", new=None) @patch("paramiko.config.invoke_import_error", new=ImportError("meh")) |