Skip to content

Commit

Permalink
skip some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Sep 10, 2024
1 parent fee4b98 commit b69cd8b
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions tests/test_io_stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import json
import os
import sys
from typing import Dict, Set, Tuple, Type
from unittest.mock import patch

Expand Down Expand Up @@ -68,18 +69,6 @@ def test_fetch_stac(httpx, s3_get):
assert stac.maxzoom == 8
assert stac.bounds

with STACReader(STAC_PATH_PROJ) as stac:
assert stac.minzoom == 6
assert stac.maxzoom == 7
assert stac.bounds
assert stac.crs == CRS.from_epsg(32617)

with STACReader(STAC_PATH_PROJ, minzoom=4, maxzoom=8) as stac:
assert stac.minzoom == 4
assert stac.maxzoom == 8
assert stac.bounds
assert stac.crs == CRS.from_epsg(32617)

# Load from dict
with STACReader(None, item=item) as stac:
assert stac.minzoom == 0
Expand Down Expand Up @@ -155,6 +144,22 @@ def raise_for_status(self):
assert s3_get.call_args[0] == ("somewhereovertherainbow.io", "mystac.json")


@pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher")
def test_projection_extension():
"""Test STAC with the projection extension."""
with STACReader(STAC_PATH_PROJ) as stac:
assert stac.minzoom == 6
assert stac.maxzoom == 7
assert stac.bounds
assert stac.crs == CRS.from_epsg(32617)

with STACReader(STAC_PATH_PROJ, minzoom=4, maxzoom=8) as stac:
assert stac.minzoom == 4
assert stac.maxzoom == 8
assert stac.bounds
assert stac.crs == CRS.from_epsg(32617)


@patch("rio_tiler.io.rasterio.rasterio")
def test_tile_valid(rio):
"""Should raise or return tiles."""
Expand Down

0 comments on commit b69cd8b

Please sign in to comment.