use tmpdir fixture
@@ -13,11 +13,11 @@ FILE_NAME = URL.split("/")[-1]
@pytest.fixture()
-def luis_model(local_cache_path="."):
+def luis_model(tmpdir):
print(FILE_NAME)
- maybe_download(URL, FILE_NAME, local_cache_path)
- assert os.path.exists(os.path.join(local_cache_path, FILE_NAME))
- with open(os.path.join(local_cache_path, FILE_NAME)) as fd:
+ maybe_download(URL, FILE_NAME, tmpdir)
+ assert os.path.exists(os.path.join(tmpdir, FILE_NAME))
+ with open(os.path.join(tmpdir, FILE_NAME)) as fd:
luis_model_obj = json.load(fd)
return luis_model_obj
return None
