-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #201 from stac-utils/rde/fix-doc-build
Fix spacenet tutorial, allow for single bbox argument to SpatialExtent, and other fixes.
- Loading branch information
Showing
9 changed files
with
191 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from datetime import datetime | ||
import unittest | ||
|
||
import pystac | ||
from tests.utils import (RANDOM_BBOX, RANDOM_GEOM) | ||
|
||
TEST_DATETIME = datetime(2020, 3, 14, 16, 32) | ||
|
||
|
||
class LinkTest(unittest.TestCase): | ||
def test_link_does_not_fail_if_href_is_none(self): | ||
"""Test to ensure get_href does not fail when the href is None""" | ||
catalog = pystac.Catalog(id='test', description='test desc') | ||
item = pystac.Item(id='test-item', | ||
geometry=RANDOM_GEOM, | ||
bbox=RANDOM_BBOX, | ||
datetime=datetime.utcnow(), | ||
properties={}) | ||
catalog.add_item(item) | ||
catalog.set_self_href('/some/href') | ||
catalog.make_all_links_relative() | ||
|
||
link = catalog.get_single_link('item') | ||
self.assertIsNone(link.get_href()) |
Oops, something went wrong.