Skip to content

Commit

Permalink
TST: Silently create test_cache if it does not exist (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
Casper-Guo authored Apr 29, 2024
1 parent 37ff42e commit 719c321
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ def reference_laps_data():
def fastf1_setup():
import fastf1
from fastf1.logger import LoggingManager
fastf1.Cache.enable_cache('test_cache') # use specific cache directory

try:
fastf1.Cache.enable_cache('test_cache') # use specific cache directory
except NotADirectoryError:
# create the test cache and re-enable
os.mkdir('test_cache')
fastf1.Cache.enable_cache('test_cache')

fastf1.Cache.ci_mode(True) # only request uncached data
LoggingManager.debug = True # raise all exceptions

0 comments on commit 719c321

Please sign in to comment.