Skip to content

Commit ea82767

Browse files
committed
Fix output not being written to temp path
1 parent aba7637 commit ea82767

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unit/test_template_factory.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from datetime import UTC
66
from datetime import datetime
7+
from pathlib import Path
78

89
import pytest
910
from pydantic import ValidationError
@@ -21,7 +22,7 @@
2122
from mdio.schemas.dtype import StructuredType
2223

2324

24-
def test_make_toy_dataset() -> None:
25+
def test_make_toy_dataset(tmp_path: Path) -> None:
2526
"""Test that make_toy_dataset returns a Dataset object using the factory pattern."""
2627
# Create dataset using factory
2728
template = SCHEMA_TEMPLATE_MAP[MDIOSchemaType.SEISMIC_3D_POST_STACK_GENERIC]
@@ -52,7 +53,8 @@ def test_make_toy_dataset() -> None:
5253
print("\nDataset Schema JSON:")
5354
print(ds.model_dump_json(indent=2))
5455

55-
write_mdio_metadata(ds, "test_toy_dataset.mdio")
56+
mdio_path = tmp_path / "test_toy_dataset.mdio"
57+
write_mdio_metadata(ds, str(mdio_path))
5658

5759
# Verify metadata
5860
assert ds.metadata.name == "campos_3d"

0 commit comments

Comments
 (0)