Skip to content

Commit c5f4937

Browse files
committed
Fix occ tests
1 parent 1205410 commit c5f4937

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

declaracad/occ/loaders.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ def load_model(
4141
4242
"""
4343
options = options or {}
44-
if filename:
45-
filename = os.path.abspath(os.path.expanduser(filename))
4644
if loader:
4745
if not loader.startswith("."):
4846
loader = f".{loader}"
4947
hook: Optional[Callable] = LOADER_REGISTRY[loader.lower()]
5048
else:
49+
if filename:
50+
filename = os.path.abspath(os.path.expanduser(filename))
5151
if not filename or not os.path.exists(filename):
5252
raise ValueError(f"File '{filename}' does not exist!")
5353
path, ext = os.path.splitext(filename.lower())

tests/test_2_occ.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ def test_topo_distance(qt_app):
447447
""",
448448
"prism": """
449449
Prism:
450+
vector = (0, 0, 10)
450451
Wire:
451452
Polyline:
452453
points = [(0,5,0), (2,6,0), (5,4,0), (0,5,0)]

0 commit comments

Comments
 (0)