Skip to content

Commit

Permalink
NPI-3689 small fixes for changes incorrectly pulled across from furth…
Browse files Browse the repository at this point in the history
…er work
  • Loading branch information
treefern committed Jan 30, 2025
1 parent 0f97f59 commit 852975c
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion gnssanalysis/gn_download.py
Original file line number Diff line number Diff line change
@@ -1032,7 +1032,9 @@ def get_iau2000_file_variants_for_dates(
raise ValueError("start_epoch, end_epoch or both, must be provided")

needed_variants: set[Literal["standard", "daily"]] = set()
date_24_hours_ago = now - timedelta(days=1)
now = _datetime.datetime.now()

date_24_hours_ago = now - _datetime.timedelta(days=1)

# Dates can't be within the last 24 hours, or in the future
if (start_epoch and start_epoch > date_24_hours_ago) or (end_epoch and end_epoch > date_24_hours_ago):
1 change: 0 additions & 1 deletion tests/test_download.py
Original file line number Diff line number Diff line change
@@ -139,7 +139,6 @@ def test_iau2000_variant_selection(self) -> None:
"Open ended range should conservatively assume the range may extend past a boundary",
)


# --- Tests for invalid values ---
# Invalid argument
with self.assertRaises(Exception):

0 comments on commit 852975c

Please sign in to comment.