Skip to content

Commit

Permalink
Get to 100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Aug 9, 2021
1 parent 82dc2b5 commit 074b2a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
17 changes: 7 additions & 10 deletions tests/datasets/test_geo.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from pathlib import Path
from typing import Any, Dict

import pytest
Expand Down Expand Up @@ -30,14 +31,6 @@ def __getitem__(self, query: BoundingBox) -> Dict[str, Any]:
return {"index": query}


class CustomRasterDataset(RasterDataset):
pass


class CustomVectorDataset(VectorDataset):
pass


class CustomVisionDataset(VisionDataset):
def __getitem__(self, index: int) -> Dict[str, Any]:
return {"index": index}
Expand Down Expand Up @@ -91,11 +84,15 @@ def test_add_vision(self, dataset: GeoDataset) -> None:


class TestRasterDataset:
pass
def test_no_data(self, tmp_path: Path) -> None:
with pytest.raises(FileNotFoundError, match="No RasterDataset data was found"):
RasterDataset(str(tmp_path))


class TestVectorDataset:
pass
def test_no_data(self, tmp_path: Path) -> None:
with pytest.raises(FileNotFoundError, match="No VectorDataset data was found"):
VectorDataset(str(tmp_path))


class TestVisionDataset:
Expand Down
1 change: 0 additions & 1 deletion torchgeo/datasets/cbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def __init__(
crs: :term:`coordinate reference system (CRS)` to warp to
(defaults to the CRS of the first file found)
res: resolution of the dataset in units of CRS
(defaults to the resolution of the first file found)
transforms: a function/transform that takes an input sample
and returns a transformed version
download: if True, download dataset and store it in the root directory
Expand Down

0 comments on commit 074b2a4

Please sign in to comment.