From 3d0cdcf4e1dc4c2979f8f69ad3e23915fd20403a Mon Sep 17 00:00:00 2001 From: gumyr Date: Wed, 21 Aug 2024 15:41:03 -0400 Subject: [PATCH] Adding support for Windows --- tests/test_importers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_importers.py b/tests/test_importers.py index 5dc252a1..4505ccf5 100644 --- a/tests/test_importers.py +++ b/tests/test_importers.py @@ -2,6 +2,7 @@ import os import unittest import urllib.request +import tempfile from build123d import BuildLine, Color, Line, Bezier, RadiusArc, Solid, Compound from build123d.importers import ( import_svg_as_buildline_code, @@ -114,7 +115,8 @@ class before any of the test methods in the class are executed. It's intended connection, or starting a server. """ url = "https://raw.githubusercontent.com/tpaviot/pythonocc-demos/master/assets/models/as1-oc-214.stp" - file_path = "/tmp/as1-oc-214.stp" + temp_dir = tempfile.gettempdir() + file_path = os.path.join(temp_dir, "as1-oc-214.stp") if not os.path.exists(file_path): urllib.request.urlretrieve(url, file_path) cls.large_step_file_path = file_path