Skip to content

Commit cc4e563

Browse files
authored
Reformat doctest
1 parent 564ce66 commit cc4e563

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

clickhouse/testcontainers/clickhouse/__init__.py

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,25 @@ class ClickHouseContainer(DbContainer):
2525
"""
2626
ClickHouse database container.
2727
28-
Example
29-
-------
30-
The example spins up a ClickHouse database and connects to it
31-
using the :code:`clickhouse-driver`.
32-
33-
.. doctest::
34-
35-
>>> from testcontainers.clickhouse import ClickHouseContainer
36-
37-
>>> import clickhouse_driver
38-
>>> with ClickHouseContainer("clickhouse/clickhouse-server:21.8") as clickhouse:
39-
... client = clickhouse_driver.Client.from_url(clickhouse.get_connection_url())
40-
... client.execute("select 'working'")
41-
[('working',)]
42-
43-
>>> import clickhouse_connect
44-
>>> with ClickHouseContainer("clickhouse/clickhouse-server:21.8", port=8123) as clickhouse:
45-
... client = clickhouse_connect.get_client(dsn=self.get_connection_url())
46-
... client.command("select 'working'")
47-
[('working',)]
28+
Example:
29+
The example spins up a ClickHouse database and connects to it
30+
using the :code:`clickhouse-driver`.
31+
32+
.. doctest::
33+
34+
>>> from testcontainers.clickhouse import ClickHouseContainer
35+
36+
>>> import clickhouse_driver
37+
>>> with ClickHouseContainer("clickhouse/clickhouse-server:21.8") as clickhouse:
38+
... client = clickhouse_driver.Client.from_url(clickhouse.get_connection_url())
39+
... client.execute("select 'working'")
40+
[('working',)]
41+
42+
>>> import clickhouse_connect
43+
>>> with ClickHouseContainer("clickhouse/clickhouse-server:21.8", port=8123) as clickhouse:
44+
... client = clickhouse_connect.get_client(dsn=self.get_connection_url())
45+
... client.command("select 'working'")
46+
[('working',)]
4847
"""
4948

5049
CLICKHOUSE_USER = os.environ.get("CLICKHOUSE_USER", "test")

0 commit comments

Comments
 (0)