Skip to content

Commit 5e20fe1

Browse files
authored
[PR #10597/01b2a86a backport][3.12] Skip test_autobahn if python_on_whales is missing (#10614)
(cherry picked from commit 01b2a86)
1 parent 7ae00b0 commit 5e20fe1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/autobahn/test_autobahn.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
import subprocess
33
import sys
44
from pathlib import Path
5-
from typing import Any, Dict, Generator, List
5+
from typing import TYPE_CHECKING, Any, Dict, Generator, List
66

77
import pytest
8-
import python_on_whales
98
from pytest import TempPathFactory
109

10+
if TYPE_CHECKING:
11+
import python_on_whales
12+
else:
13+
python_on_whales = pytest.importorskip("python_on_whales")
14+
1115

1216
@pytest.fixture(scope="session")
1317
def report_dir(tmp_path_factory: TempPathFactory) -> Path:

0 commit comments

Comments
 (0)