bigquery-etl/tests/query_scheduling/test_utils.py

12 строки
575 B
Python
Исходник Обычный вид История

2020-07-08 22:21:55 +03:00
from bigquery_etl.query_scheduling.utils import schedule_interval_delta
class TestUtils:
def test_schedule_interval_delta(self):
2020-07-08 23:02:40 +03:00
assert schedule_interval_delta("0 1 * * *", "0 2 * * *") == "3600s"
assert schedule_interval_delta("0 2 * * *", "0 0 * * *") == "-7200s"
2020-07-08 22:21:55 +03:00
assert schedule_interval_delta("* * * * *", "* * * * *") == "0s"
assert schedule_interval_delta("0 1 * * *", "0 1 * * *") == "0s"
2020-07-08 23:02:40 +03:00
assert schedule_interval_delta("daily", "0 1 * * *") == "3600s"
2020-07-08 22:21:55 +03:00
assert schedule_interval_delta("daily", "0 0 * * *") == "0s"