Skip to content

Commit

Permalink
use Path for windows?
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiesquire committed Jun 30, 2023
1 parent ecbb538 commit 946b8dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/test_builders.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2023 ACCESS-NRI and contributors. See the top-level COPYRIGHT file for details.
# SPDX-License-Identifier: Apache-2.0

from pathlib import Path

import intake
import pandas as pd
import pytest
Expand Down Expand Up @@ -37,7 +39,7 @@ def test_builder_build(
Test the various steps of the build process
"""
Builder = getattr(builders, builder)
path = [str(test_data / basedir) for basedir in basedirs]
path = [str(test_data / Path(basedir)) for basedir in basedirs]
builder = Builder(path, **kwargs)

builder.get_assets()
Expand Down
4 changes: 3 additions & 1 deletion tests/test_source_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2023 ACCESS-NRI and contributors. See the top-level COPYRIGHT file for details.
# SPDX-License-Identifier: Apache-2.0

from pathlib import Path

import pytest

from access_nri_intake.source.utils import parse_access_filename, parse_access_ncfile
Expand Down Expand Up @@ -293,6 +295,6 @@ def test_parse_access_filename(filename, expected):
],
)
def test_parse_access_ncfile(test_data, filename, expected):
file = test_data / filename
file = str(test_data / Path(filename))

assert parse_access_ncfile(file) == expected

0 comments on commit 946b8dd

Please sign in to comment.