Files
connect/tests/integration_tests/test_protocol_version.py
Joe SpadolaandGitHub 55dcd7db4c Replace pylint with ruff for linting and formatting (#703)
* migrate from pylint to ruff

* ruff format/lint switch over

* add formatting commit

* update changelog
2026-04-02 16:09:59 -07:00

13 lines
521 B
Python

from clickhouse_connect.driver import Client
def test_protocol_version(param_client: Client, call):
query = "select toDateTime(1676369730, 'Asia/Shanghai') as dt FORMAT Native"
raw = call(param_client.raw_query, query)
assert raw.hex() == "0101026474084461746554696d65425feb63"
if param_client.min_version("23.3"):
raw = call(param_client.raw_query, query, settings={"client_protocol_version": 54337})
ch_type = raw[14:39].decode()
assert ch_type == "DateTime('Asia/Shanghai')"