hotpocket/services/packages/testing/hotpocket_testing/asserts/datetime.py
Tomek Wójcik b4338e2769
Some checks failed
CI / Checks (push) Failing after 13m2s
Release v1.0.0
2025-08-20 21:00:50 +02:00

15 lines
399 B
Python

# -*- coding: utf-8 -*-
from __future__ import annotations
import datetime
import dateutil
DELTA = datetime.timedelta(microseconds=100_000) # 100ms
def assert_datetimes_are_really_close(datetime1: datetime.datetime,
datetime2: datetime.datetime,
):
assert dateutil.utils.within_delta(datetime1, datetime2, DELTA)