Skip to content

Commit

Permalink
fix: correct path creation in test
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Koppen <[email protected]>
  • Loading branch information
vincentkoppen committed Jan 17, 2025
1 parent a60b448 commit a04ff49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/unit/model/grids/test_grid_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""Grid tests"""

import dataclasses
from pathlib import Path

import numpy as np
import pytest
Expand Down Expand Up @@ -294,8 +293,8 @@ def test_from_txt_file_with_branch_ids(tmp_path):
np.testing.assert_array_equal([95, 91, 92, 93, 94, 96, 97, 98], grid.branches.id)


def test_from_txt_file_conflicting_ids():
txt_file = Path("/tmp/tmp_grid")
def test_from_txt_file_conflicting_ids(tmp_path):
txt_file = tmp_path / "tmp_grid"
txt_file.write_text("S1 2\n1 3", encoding="utf-8")

with pytest.raises(ValueError):
Expand Down

0 comments on commit a04ff49

Please sign in to comment.