Skip to content

Commit

Permalink
add test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsleh committed Feb 27, 2022
1 parent 5b58fd4 commit c496b11
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/datasets/test_esri2020.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ def test_getitem(self, dataset: Esri2020) -> None:
def test_already_extracted(self, dataset: Esri2020) -> None:
Esri2020(root=dataset.root, download=True)

def test_not_extracted(self, tmp_path: Path) -> None:
url = os.path.join(
"tests",
"data",
"esri2020",
"io-lulc-model-001-v01-composite-v03-supercell-v02-clip-v01.zip",
)
shutil.copy(url, tmp_path)
Esri2020(root=str(tmp_path))

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

0 comments on commit c496b11

Please sign in to comment.