maybe fix windows

This commit is contained in:
Jesse Bannon 2026-01-03 11:03:30 -08:00
parent 91116aa6f7
commit f461b71ac3

View file

@ -87,7 +87,7 @@ def working_directory() -> str:
@pytest.fixture()
def output_directory() -> str:
with tempfile.TemporaryDirectory() as temp_dir:
yield temp_dir
yield os.path.normpath(temp_dir)
@pytest.fixture()
@ -172,10 +172,11 @@ def subscription_yaml_file_generator() -> Callable:
with tempfile.NamedTemporaryFile(suffix=".yaml", delete=False) as tmp_file:
tmp_file.write(json.dumps(yaml_dict).encode("utf-8"))
file_path = os.path.normpath(tmp_file.name)
try:
yield tmp_file.name
yield file_path
finally:
FileHandler.delete(tmp_file.name)
FileHandler.delete(file_path)
return _subscription_yaml_file_generator
@ -276,10 +277,11 @@ def default_config_path(default_config) -> str:
with tempfile.NamedTemporaryFile(suffix=".yaml", delete=False) as tmp_file:
tmp_file.write(json.dumps(default_config._value).encode("utf-8"))
file_path = os.path.normpath(tmp_file.name)
try:
yield tmp_file.name
yield file_path
finally:
FileHandler.delete(tmp_file.name)
FileHandler.delete(file_path)
@pytest.fixture()