Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akotyla committed Sep 24, 2024
1 parent d097248 commit 3798a54
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import tempfile
import warnings
from abc import ABC, abstractmethod
from pathlib import Path
from typing import Literal
Expand Down Expand Up @@ -107,10 +106,6 @@ async def fetch(self) -> Path:
raise ImportError("You need to install the 'gcloud-aio-storage' package to use Google Cloud Storage")

if (local_dir_env := os.getenv(LOCAL_STORAGE_DIR_ENV)) is None:
warnings.warn(
"The environment variable 'LOCAL_STORAGE_DIR_ENV' is not set. A temporary directory will be used "
"to store the file."
)
local_dir = Path(tempfile.gettempdir())
else:
local_dir = Path(local_dir_env)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ async def test_gcs_source_fetch():
assert path == TEST_FILE_PATH

source = GCSSource(bucket="", object_name="not_found_file.py")
with pytest.raises(aiohttp.ClientResponseError):
with pytest.raises(aiohttp.ClientConnectorError):
await source.fetch()

0 comments on commit 3798a54

Please sign in to comment.