Skip to content

Commit 6546020

Browse files
Merge pull request #151 from stac-utils/patch/add-search-datetime-tests
add more start/end datetime tests
2 parents f09aeda + 9801cbb commit 6546020

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/cicd.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
tags:
99
- '*'
1010
pull_request:
11+
env:
12+
LATEST_PY_VERSION: '3.12'
1113

1214
jobs:
1315
tests:
@@ -35,10 +37,10 @@ jobs:
3537
run: tox -e py
3638

3739
- name: Upload Results
38-
if: success()
39-
uses: codecov/codecov-action@v1
40+
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }}
41+
uses: codecov/codecov-action@v4
4042
with:
4143
file: ./coverage.xml
4244
flags: unittests
43-
name: ${{ matrix.platform }}-${{ matrix.tox-env }}
45+
name: ${{ matrix.python-version }}
4446
fail_ci_if_error: false

tests/api/test_search.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ def test_temporal_search_two_tailed():
7777
assert search.start_date == utcnow
7878
assert search.end_date is None
7979

80+
search = Search(collections=["collection1"], datetime=f"../{utcnow_str}")
81+
assert search.start_date is None
82+
assert search.end_date == utcnow
83+
84+
search = Search(collections=["collection1"], datetime=f"/{utcnow_str}")
85+
assert search.start_date is None
86+
assert search.end_date == utcnow
87+
8088

8189
def test_temporal_search_open():
8290
# Test open date range

0 commit comments

Comments
 (0)