File tree Expand file tree Collapse file tree 5 files changed +6
-5
lines changed
compose/testcontainers/compose
google/testcontainers/google
localstack/testcontainers/localstack
mysql/testcontainers/mysql
oracle/testcontainers/oracle Expand file tree Collapse file tree 5 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class DockerCompose(object):
31
31
32
32
Example
33
33
-------
34
- ::
34
+ .. doctest ::
35
35
36
36
with DockerCompose("/home/project",
37
37
compose_file_name=["docker-compose-1.yml", "docker-compose-2.yml"],
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ class PubSubContainer(DockerContainer):
24
24
The :code:`pubsub` instance provides convenience methods :code:`get_publisher` and
25
25
:code:`get_subscriber` to connect to the emulator without having to set the environment variable
26
26
:code:`PUBSUB_EMULATOR_HOST`.
27
- ::
27
+
28
+ .. doctest::
28
29
29
30
def test_docker_run_pubsub():
30
31
config = PubSubContainer('google/cloud-sdk:emulators')
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class LocalStackContainer(DockerContainer):
30
30
<testcontainers.localstack.LocalStackContainer object at 0x...>
31
31
32
32
The endpoint can be used to create a client with the boto3 library:
33
- ::
33
+ .. doctest ::
34
34
35
35
dynamo_client = boto3.client("dynamodb", endpoint_url=dynamo_endpoint)
36
36
scan_result = dynamo_client.scan(TableName='foo')
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ class MariaDbContainer(MySqlContainer):
77
77
78
78
Example
79
79
-------
80
- ::
80
+ .. doctest ::
81
81
82
82
with MariaDbContainer("mariadb:latest") as mariadb:
83
83
e = sqlalchemy.create_engine(mariadb.get_connection_url())
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ class OracleDbContainer(DbContainer):
7
7
8
8
Example
9
9
-------
10
- ::
10
+ .. code-block ::
11
11
12
12
>>> import sqlalchemy
13
13
>>> from testcontainers.oracle import OracleDbContainer
You can’t perform that action at this time.
0 commit comments