Skip to content

Commit

Permalink
fill coverage gap
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsleh committed Apr 18, 2023
1 parent a06234d commit 976c6a1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/datasets/test_western_usa_live_fuel_moisture.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@ def test_getitem(self, dataset: WesternUSALiveFuelMoisture, index: int) -> None:
def test_len(self, dataset: WesternUSALiveFuelMoisture) -> None:
assert len(dataset) == 3

def test_already_downloaded(self, dataset: WesternUSALiveFuelMoisture) -> None:
WesternUSALiveFuelMoisture(root=dataset.root, download=True, api_key="")
def test_already_downloaded(self, tmp_path: Path) -> None:
pathname = os.path.join(
"tests",
"data",
"western_usa_live_fuel_moisture",
"su_sar_moisture_content.tar.gz",
)
root = str(tmp_path)
shutil.copy(pathname, root)
WesternUSALiveFuelMoisture(root)

def test_not_downloaded(self, tmp_path: Path) -> None:
with pytest.raises(RuntimeError, match="Dataset not found in"):
Expand Down

0 comments on commit 976c6a1

Please sign in to comment.