Skip to content

Commit

Permalink
fix(fixtures): don't use square brackets in tempdir paths
Browse files Browse the repository at this point in the history
* multiple programs don't like this: gridgen, iris
  • Loading branch information
wpbonelli committed Jun 10, 2024
1 parent 4e289ee commit 2c91b4b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modflow_devtools/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@

@pytest.fixture(scope="function")
def function_tmpdir(tmpdir_factory, request) -> Generator[Path, None, None]:
node = request.node.name.replace("/", "_").replace("\\", "_").replace(":", "_")
temp = Path(tmpdir_factory.mktemp(node))
node_name = request.node.name\
.replace("/", "_")\
.replace("\\", "_")\
.replace(":", "_")\
.replace("[", "_")\
.replace("]", "_")
temp = Path(tmpdir_factory.mktemp(node_name))
yield Path(temp)

keep = request.config.option.KEEP
Expand Down

0 comments on commit 2c91b4b

Please sign in to comment.