Files
connect/tests/conftest.py
e61fffc2ab drop pytz dependency (#715)
* drop pytz dependency and only make backports.zoneinfo required prior to the introduction of zoneinfo in the standard library because pytz docs mention that it shouldnt be required anymore and it is always good to cut back on uneeded 3rd party dependencies

* some consistency updates

* addressing review comments

* don't mutate callers column_tzs

* minor tweaks

---------

Co-authored-by: Joe Spadola <[email protected]>
2026-04-22 09:33:21 -07:00

18 lines
335 B
Python

import os
import time
from datetime import timezone
import pytest
from clickhouse_connect.datatypes.format import clear_all_formats
from clickhouse_connect.driver import tzutil
os.environ["TZ"] = "UTC"
time.tzset()
@pytest.fixture(autouse=True)
def clean_global_state():
clear_all_formats()
tzutil.local_tz = timezone.utc