From 254bbd8548c08be4d49aca2e2fcedf23e1d23436 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 29 Aug 2021 00:29:11 +0200 Subject: [PATCH] Try to skip if import fails. --- tests/unit/plugins/modules/source_control/gitlab/gitlab.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/plugins/modules/source_control/gitlab/gitlab.py b/tests/unit/plugins/modules/source_control/gitlab/gitlab.py index 5feff78b43..e418ae77ad 100644 --- a/tests/unit/plugins/modules/source_control/gitlab/gitlab.py +++ b/tests/unit/plugins/modules/source_control/gitlab/gitlab.py @@ -8,12 +8,14 @@ __metaclass__ = type import sys +import pytest + from httmock import response # noqa from httmock import urlmatch # noqa from ansible_collections.community.general.tests.unit.compat import unittest -import gitlab +gitlab = pytest.importorskip('gitlab') class FakeAnsibleModule(object):