Skip to content

Commit 741d445

Browse files
authored
feat: enable parasolid txt + bin formats on linux (#570)
1 parent 5dc8b3f commit 741d445

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def pytest_addoption(parser):
2525
parser.addoption(
2626
"--service-os",
2727
action="store",
28-
default="no",
28+
default="windows",
2929
help="Geometry service OS running. Options: 'windows' or 'linux'. By default, 'windows'.",
3030
choices=("windows", "linux"),
3131
)

tests/integration/test_design.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -778,9 +778,7 @@ def test_bodies_translation(modeler: Modeler):
778778
)
779779

780780

781-
def test_download_file(
782-
modeler: Modeler, tmp_path_factory: pytest.TempPathFactory, skip_not_on_linux_service
783-
):
781+
def test_download_file(modeler: Modeler, tmp_path_factory: pytest.TempPathFactory, service_os: str):
784782
"""Test for downloading a design in multiple modes and verifying the correct
785783
download."""
786784

@@ -806,8 +804,15 @@ def test_download_file(
806804
design.save(file_location=file_save)
807805

808806
# Check for other exports
809-
binary_parasolid_file = tmp_path_factory.mktemp("scdoc_files_download") / "cylinder.x_b"
810-
text_parasolid_file = tmp_path_factory.mktemp("scdoc_files_download") / "cylinder.x_t"
807+
if service_os == "windows":
808+
binary_parasolid_file = tmp_path_factory.mktemp("scdoc_files_download") / "cylinder.x_b"
809+
text_parasolid_file = tmp_path_factory.mktemp("scdoc_files_download") / "cylinder.x_t"
810+
elif service_os == "linux":
811+
binary_parasolid_file = tmp_path_factory.mktemp("scdoc_files_download") / "cylinder.xmt_bin"
812+
text_parasolid_file = tmp_path_factory.mktemp("scdoc_files_download") / "cylinder.xmt_txt"
813+
else:
814+
raise Exception("Unable to determine the service operating system.")
815+
811816
fmd_file = tmp_path_factory.mktemp("scdoc_files_download") / "cylinder.fmd"
812817

813818
design.download(binary_parasolid_file, format=DesignFileFormat.PARASOLID_BIN)

0 commit comments

Comments
 (0)