Skip to content

Commit de5439b

Browse files
authored
Allow CI tests to select the directory where their cache and corpus will be placed (#213)
1 parent 1c69f36 commit de5439b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/turnkeyml/common/test_helpers.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,12 @@ def forward(self, x):
100100
}
101101

102102

103-
def create_test_dir(key: str, test_scripts: Dict = None):
103+
def create_test_dir(
104+
key: str,
105+
test_scripts: Dict = None,
106+
base_dir: str = os.path.dirname(os.path.abspath(__file__)),
107+
):
104108
# Define paths to be used
105-
base_dir = os.path.dirname(os.path.abspath(__file__))
106109
cache_dir = os.path.join(base_dir, "generated", f"{key}_cache_dir")
107110
corpus_dir = os.path.join(base_dir, "generated", "test_corpus")
108111

0 commit comments

Comments
 (0)