From 4e4f0d927e112fc5b561a2c32dce8683afdfc5f2 Mon Sep 17 00:00:00 2001 From: Tom Brooks Date: Fri, 30 Oct 2026 11:16:39 +0000 Subject: [PATCH] feat: convert zip with string outpu path --- digital_land/phase/convert.py | 2 +- tests/unit/phase/test_convert.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/digital_land/phase/convert.py b/digital_land/phase/convert.py index b73989f75..d22282b50 100644 --- a/digital_land/phase/convert.py +++ b/digital_land/phase/convert.py @@ -401,7 +401,7 @@ def _read_binary_file(self, input_path): # TODO erpace temp path with output path if self.output_path: temp_path = tempfile.NamedTemporaryFile( - suffix=".zip", dir=str(self.output_path.parent) + suffix=".zip", dir=os.path.dirname(self.output_path) ).name else: temp_path = tempfile.NamedTemporaryFile(suffix=".zip").name diff --git a/tests/unit/phase/test_convert.py b/tests/unit/phase/test_convert.py index d588c8924..f52b050ff 100755 --- a/tests/unit/phase/test_convert.py +++ b/tests/unit/phase/test_convert.py @@ -30,6 +30,7 @@ def test_process_xlsm_is_loaded(self): "tests/data/resource_examples/geopackage.resource", "tests/data/resource_examples/gml.resource", "tests/data/resource_examples/kml.resource", + "tests/data/resource_examples/shapefile_zip.resource", "tests/expectations/resources_to_test_expectations/data_for_url_expect_test.sqlite3", ], )