File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -939,7 +939,7 @@ def test_collections_cache_correctly(self) -> None:
939939
940940 def test_reading_iterating_and_writing_works_as_expected (self ) -> None :
941941 """Test case to cover issue #88"""
942- stac_uri = "tests/ data-files/catalogs/test-case-6/catalog.json"
942+ stac_uri = TestCases . get_path ( " data-files/catalogs/test-case-6/catalog.json")
943943 cat = Catalog .from_file (stac_uri )
944944
945945 # Iterate over the items. This was causing failure in
Original file line number Diff line number Diff line change 22import json
33from pystac .item_collection import ItemCollection
44import unittest
5+ from os .path import relpath
6+
57import pystac
68
79from tests .utils import TestCases
@@ -101,7 +103,11 @@ def test_raise_error_for_invalid_object(self) -> None:
101103
102104 def test_from_relative_path (self ) -> None :
103105 _ = pystac .ItemCollection .from_file (
104- "./tests/data-files/item-collection/sample-item-collection.json"
106+ relpath (
107+ TestCases .get_path (
108+ "data-files/item-collection/sample-item-collection.json"
109+ )
110+ )
105111 )
106112
107113 def test_from_list_of_dicts (self ) -> None :
Original file line number Diff line number Diff line change 88from pystac import utils
99
1010from pystac .utils import make_relative_href , make_absolute_href , is_absolute_href
11+ from tests .utils import TestCases
1112
1213
1314class UtilsTest (unittest .TestCase ):
@@ -273,7 +274,9 @@ def test_datetime_to_str(self) -> None:
273274
274275 def test_geojson_bbox (self ) -> None :
275276 # Use sample Geojson from https://en.wikipedia.org/wiki/GeoJSON
276- with open ("tests/data-files/geojson/sample.geojson" ) as sample_geojson :
277+ with open (
278+ TestCases .get_path ("data-files/geojson/sample.geojson" )
279+ ) as sample_geojson :
277280 all_features = json .load (sample_geojson )
278281 geom_dicts = [f ["geometry" ] for f in all_features ["features" ]]
279282 for geom in geom_dicts :
You can’t perform that action at this time.
0 commit comments