Skip to content

Commit 92732c0

Browse files
authored
Skip pylibssh tests if pylibsshext is not installed (#117)
Skip pylibssh unit tests if pylibsshext is not installed Reviewed-by: https://github.com/apps/ansible-zuul
1 parent 20124ec commit 92732c0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/unit/plugins/connection/test_libssh.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@
66

77
__metaclass__ = type
88

9+
import pytest
10+
11+
from ansible.module_utils._text import to_bytes
12+
from ansible.errors import AnsibleError, AnsibleFileNotFound
13+
from ansible.playbook.play_context import PlayContext
14+
from ansible.plugins.loader import connection_loader
915
from ansible_collections.ansible.netcommon.tests.unit.compat import unittest
1016
from ansible_collections.ansible.netcommon.tests.unit.compat.mock import (
1117
patch,
1218
MagicMock,
1319
)
1420

15-
from ansible.module_utils._text import to_bytes
16-
from ansible.errors import AnsibleError, AnsibleFileNotFound
17-
from ansible.playbook.play_context import PlayContext
18-
from ansible.plugins.loader import connection_loader
21+
pylibsshext = pytest.importorskip("pylibsshext")
1922

2023

2124
class TestConnectionClass(unittest.TestCase):

0 commit comments

Comments
 (0)