Skip to content

Commit

Permalink
Merge pull request #151 from stac-utils/patch/add-search-datetime-tests
Browse files Browse the repository at this point in the history
add more start/end datetime tests
  • Loading branch information
vincentsarago authored May 21, 2024
2 parents f09aeda + 9801cbb commit 6546020
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
tags:
- '*'
pull_request:
env:
LATEST_PY_VERSION: '3.12'

jobs:
tests:
Expand Down Expand Up @@ -35,10 +37,10 @@ jobs:
run: tox -e py

- name: Upload Results
if: success()
uses: codecov/codecov-action@v1
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }}
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: ${{ matrix.platform }}-${{ matrix.tox-env }}
name: ${{ matrix.python-version }}
fail_ci_if_error: false
8 changes: 8 additions & 0 deletions tests/api/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ def test_temporal_search_two_tailed():
assert search.start_date == utcnow
assert search.end_date is None

search = Search(collections=["collection1"], datetime=f"../{utcnow_str}")
assert search.start_date is None
assert search.end_date == utcnow

search = Search(collections=["collection1"], datetime=f"/{utcnow_str}")
assert search.start_date is None
assert search.end_date == utcnow


def test_temporal_search_open():
# Test open date range
Expand Down

0 comments on commit 6546020

Please sign in to comment.