Skip to content

Commit 54e0114

Browse files
committed
fix filesystem path
1 parent 676324e commit 54e0114

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

tests_integration/lib/_run_test_cases.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import logging
2-
from pathlib import Path
32

43
from github import Github
4+
from importlib_resources import as_file, files
55

66
from conda_forge_tick.settings import settings
77

@@ -10,6 +10,7 @@
1010
from ._shared import FEEDSTOCK_SUFFIX, get_github_token
1111

1212
LOGGER = logging.getLogger(__name__)
13+
EMPTY_GRAPH_DIR = files("tests_integration.resources").joinpath("empty-graph").name
1314

1415

1516
def close_all_open_pull_requests():
@@ -27,12 +28,13 @@ def close_all_open_pull_requests():
2728

2829

2930
def reset_cf_graph():
30-
IntegrationTestHelper().overwrite_github_repository(
31-
GitHubAccount.REGRO_ORG,
32-
"cf-graph-countyfair",
33-
Path(__file__).parent / "resources" / "empty-graph",
34-
branch=settings().graph_repo_default_branch,
35-
)
31+
with as_file(EMPTY_GRAPH_DIR) as empty_graph_dir:
32+
IntegrationTestHelper().overwrite_github_repository(
33+
GitHubAccount.REGRO_ORG,
34+
"cf-graph-countyfair",
35+
empty_graph_dir,
36+
branch=settings().graph_repo_default_branch,
37+
)
3638

3739

3840
def run_all_prepare_functions(scenario: dict[str, TestCase]):

tests_integration/resources/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)