Skip to content

Commit 9b81df5

Browse files
committed
Set a fixed test-time for test_pulse_collection_consumption()
1 parent ea25644 commit 9b81df5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_usb.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,8 +946,9 @@ def test_pulse_collection_consumption(
946946
"""Testing pulse collection class."""
947947
monkeypatch.setattr(pw_energy_pulses, "MAX_LOG_HOURS", 24)
948948

949-
fixed_timestamp_utc = dt.now(UTC)
950-
fixed_this_hour = fixed_timestamp_utc.replace(minute=0, second=0, microsecond=0)
949+
# fixed_timestamp_utc = dt.now(UTC)
950+
# fixed_this_hour = fixed_timestamp_utc.replace(minute=0, second=0, microsecond=0)
951+
fixed_this_hour = freeze_time("2025-04-04 00:00:00")
951952

952953
# Test consumption logs
953954
tst_consumption = pw_energy_pulses.PulseCollection(mac="0098765432101234")

0 commit comments

Comments
 (0)