Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Feb 7, 2024
1 parent dd25609 commit 9fd6fb4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 7 additions & 2 deletions tests/unit/test_collection_queries.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# package imports
import datetime as dt

import pytest
from earthaccess.search import DataCollections


valid_single_dates = [
("2001-12-12", "2001-12-21", "2001-12-12T00:00:00Z,2001-12-21T00:00:00Z"),
("2021-02-01", "", "2021-02-01T00:00:00Z,"),
("1999-02-01 06:00", "2009-01-01", "1999-02-01T06:00:00Z,2009-01-01T00:00:00Z"),
(dt.datetime(2021, 2, 1), dt.datetime(2021, 2, 2), "2021-02-01T00:00:00Z,2021-02-02T00:00:00Z")
(
dt.datetime(2021, 2, 1),
dt.datetime(2021, 2, 2),
"2021-02-01T00:00:00Z,2021-02-02T00:00:00Z",
),
]

invalid_single_dates = [
Expand All @@ -17,6 +21,7 @@
("2999-02-01", "2009-01-01", None),
]


def test_query_can_find_cloud_provider():
query = DataCollections().daac("PODAAC").cloud_hosted(True)
assert query.params["provider"] == "POCLOUD"
Expand Down
7 changes: 6 additions & 1 deletion tests/unit/test_granule_queries.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# package imports
import datetime as dt

import pytest
from earthaccess.search import DataGranules

valid_single_dates = [
("2001-12-12", "2001-12-21", "2001-12-12T00:00:00Z,2001-12-21T00:00:00Z"),
("2021-02-01", "", "2021-02-01T00:00:00Z,"),
("1999-02-01 06:00", "2009-01-01", "1999-02-01T06:00:00Z,2009-01-01T00:00:00Z"),
(dt.datetime(2021, 2, 1), dt.datetime(2021, 2, 2), "2021-02-01T00:00:00Z,2021-02-02T00:00:00Z")
(
dt.datetime(2021, 2, 1),
dt.datetime(2021, 2, 2),
"2021-02-01T00:00:00Z,2021-02-02T00:00:00Z",
),
]

invalid_single_dates = [
Expand Down

0 comments on commit 9fd6fb4

Please sign in to comment.