File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 1
1
import logging
2
- from pathlib import Path
3
2
4
3
from github import Github
4
+ from importlib_resources import as_file , files
5
5
6
6
from conda_forge_tick .settings import settings
7
7
10
10
from ._shared import FEEDSTOCK_SUFFIX , get_github_token
11
11
12
12
LOGGER = logging .getLogger (__name__ )
13
+ EMPTY_GRAPH_DIR = files ("tests_integration.resources" ).joinpath ("empty-graph" ).name
13
14
14
15
15
16
def close_all_open_pull_requests ():
@@ -27,12 +28,13 @@ def close_all_open_pull_requests():
27
28
28
29
29
30
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
+ )
36
38
37
39
38
40
def run_all_prepare_functions (scenario : dict [str , TestCase ]):
You can’t perform that action at this time.
0 commit comments