1
0
mirror of synced 2026-01-14 03:04:49 -05:00
Files
airbyte/airbyte-cdk/python/unit_tests/conftest.py
2024-07-02 11:47:56 -07:00

16 lines
373 B
Python

#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
import datetime
import freezegun
import pytest
@pytest.fixture()
def mock_sleep(monkeypatch):
with freezegun.freeze_time(datetime.datetime.now(), ignore=['_pytest.runner', '_pytest.terminal']) as frozen_datetime:
monkeypatch.setattr('time.sleep', lambda x: frozen_datetime.tick(x))
yield