File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,15 @@ def test_read_write_collection(self) -> None:
2424 pystac .write_file (collection , dest_href = dest_href )
2525 self .assertTrue (os .path .exists (dest_href ), msg = "File was not written." )
2626
27+ def test_read_write_collection_with_file_protocol (self ) -> None :
28+ collection = pystac .read_file (
29+ "file://" + TestCases .get_path ("data-files/collections/multi-extent.json" )
30+ )
31+ with tempfile .TemporaryDirectory () as tmp_dir :
32+ dest_href = os .path .join (tmp_dir , "collection.json" )
33+ pystac .write_file (collection , dest_href = "file://" + dest_href )
34+ self .assertTrue (os .path .exists (dest_href ), msg = "File was not written." )
35+
2736 def test_read_item (self ) -> None :
2837 item = pystac .read_file (TestCases .get_path ("data-files/item/sample-item.json" ))
2938 with tempfile .TemporaryDirectory () as tmp_dir :
You can’t perform that action at this time.
0 commit comments