Skip to content

Commit

Permalink
attempt to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
whimo committed Jul 22, 2024
1 parent 238c536 commit 5ca4015
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/run_integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import nbformat
from dotenv import load_dotenv
from motleycache import enable_cache, set_cache_location, set_strong_cache, set_cache_blacklist
from motleycache import set_cache_location, set_strong_cache
from nbconvert.preprocessors import ExecutePreprocessor
from nbformat.v4.nbbase import new_code_cell

Expand Down Expand Up @@ -146,10 +146,13 @@ def run_ipynb(ipynb_path: str, strong_cache: bool = False, cache_sub_dir: str =
new_code_cell(
"from motleycache.caching import enable_cache, disable_cache, set_cache_location"
),
new_code_cell("from motleycache import set_strong_cache"),
new_code_cell("from motleycache import set_strong_cache, set_cache_blacklist"),
new_code_cell("enable_cache()"),
new_code_cell("set_strong_cache({})".format(str_strong_cache)),
new_code_cell("set_cache_location(r'{}')".format(cache_sub_dir)),
new_code_cell(
"set_cache_blacklist(['*openaipublic.blob.core.windows.net/encodings*'])"
),
]
for cell in reversed(cells):
nb.cells.insert(0, cell)
Expand Down Expand Up @@ -282,8 +285,6 @@ def main():
parser = get_args_parser()
args = parser.parse_args()

enable_cache()
set_cache_blacklist(["*openaipublic.blob.core.windows.net/encodings*"])
run_integration_tests(
cache_dir=args.cache_dir,
golden_dir=args.golden_dir,
Expand Down

0 comments on commit 5ca4015

Please sign in to comment.