Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anschweitzer committed Aug 6, 2024
1 parent ac98095 commit e25a6bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# type: ignore

"""Nox sessions."""

import os
Expand Down
10 changes: 6 additions & 4 deletions src/gw/property_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ def check_is_market_slot_name_lrd_format(v: str) -> None:
x = v.split(".")
except AttributeError as e:
raise ValueError(f"{v} failed to split on '.'") from e
slot_start_str = x[-1]
try:
slot_start = int(x[-1])
except ValueError as e:
raise ValueError(f"slot start {slot_start} not an int") from e
check_is_reasonable_unix_time_s(slot_start)
if slot_start % 300 != 0:
raise ValueError(f"slot start {slot_start} not a multiple of 300")
raise ValueError(f"slot start {slot_start_str} not an int") from e
else:
check_is_reasonable_unix_time_s(slot_start)
if slot_start % 300 != 0:
raise ValueError(f"slot start {slot_start} not a multiple of 300")

market_name = ".".join(x[:-1])
try:
Expand Down

0 comments on commit e25a6bb

Please sign in to comment.