diff --git a/freezegun/api.py b/freezegun/api.py index e48a871..8f0b755 100644 --- a/freezegun/api.py +++ b/freezegun/api.py @@ -532,7 +532,7 @@ def __call__(self) -> datetime.datetime: return self.time_to_freeze def tick(self, delta: Union[datetime.timedelta, float]=datetime.timedelta(seconds=1)) -> datetime.datetime: - if isinstance(delta, float): + if isinstance(delta, (int, float)): # noinspection PyTypeChecker self.time_to_freeze += datetime.timedelta(seconds=delta) else: @@ -560,7 +560,7 @@ def __call__(self) -> datetime.datetime: def tick(self, delta: Union[datetime.timedelta, float, None]=None) -> datetime.datetime: if not delta: delta = datetime.timedelta(seconds=self.step_width) - elif isinstance(delta, float): + elif isinstance(delta, (int, float)): delta = datetime.timedelta(seconds=delta) self.time_to_freeze += delta # type: ignore return self.time_to_freeze