Skip to content

Commit e93e2f7

Browse files
committed
Skip test_autobahn if python_on_whales is missing
Docker (and therefore python_on_whales) is not portable and would be missing on e.g. BSD systems. Don't fail tests in that case.
1 parent 1b96586 commit e93e2f7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/autobahn/test_autobahn.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66

77
import pytest
88
from pytest import TempPathFactory
9-
from python_on_whales import DockerException, docker
9+
10+
if TYPE_CHECKING:
11+
from python_on_whales import DockerException, docker
12+
else:
13+
DockerException = pytest.importorskip("python_on_whales.DockerException")
14+
docker = pytest.importorskip("python_on_whales.docker")
1015

1116

1217
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)