Skip to content

Commit 388628e

Browse files
committed
dev(hansbug): add host addrs
1 parent b228d95 commit 388628e

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

plantumlcli/models/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
def _has_cairosvg():
99
try:
1010
import cairosvg
11-
except (ImportError, ModuleNotFoundError):
11+
except (ImportError, ModuleNotFoundError, OSError):
1212
return False
1313
else:
1414
return True

test/entry/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def uml_large():
3131
def _has_cairosvg():
3232
try:
3333
import cairosvg
34-
except (ImportError, ModuleNotFoundError):
34+
except (ImportError, ModuleNotFoundError, OSError):
3535
return False
3636
else:
3737
return True

test/models/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def uml_helloworld_code(uml_helloworld):
1818
def _has_cairosvg():
1919
try:
2020
import cairosvg
21-
except (ImportError, ModuleNotFoundError):
21+
except (ImportError, ModuleNotFoundError, OSError):
2222
return False
2323
else:
2424
return True

test/models/test_remote.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616
class TestModelsRemote:
1717
@pytest.fixture()
1818
def host(self, is_official, plantuml_host):
19-
return OFFICIAL_PLANTUML_HOST if is_official else plantuml_host
19+
host_addr = OFFICIAL_PLANTUML_HOST if is_official else plantuml_host
20+
if not host_addr:
21+
pytest.skip('No plantuml host assigned')
22+
return None
23+
else:
24+
return host_addr
2025

2126
@pytest.fixture()
2227
def plantuml(self, host):

0 commit comments

Comments
 (0)