Skip to content

Commit

Permalink
Ensure a string is passed to zimiporter
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed May 19, 2023
1 parent 149a97a commit 12528d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_xml/test_get_validated_tree.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# stdlib
import os
import pathlib
from zipimport import zipimporter

Expand All @@ -20,7 +21,8 @@
# 3rd party
from zipp import Path as ZipPath # type: ignore

test_xml_zipapp = zipimporter(files(tests.test_xml).joinpath("test_xml_zipapp.pyz")).load_module("test_xml_zipapp")
zipapp_path = os.fspath(files(tests.test_xml) / "test_xml_zipapp.pyz")
test_xml_zipapp = zipimporter(zipapp_path).load_module("test_xml_zipapp")

shiporder_filename: ZipPath = files(tests.test_xml).joinpath("shiporder.xml")
bad_file: ZipPath = files(tests.test_xml).joinpath("bad_file.xml")
Expand Down

0 comments on commit 12528d5

Please sign in to comment.