Skip to content

Commit 79856b5

Browse files
committed
Add outstanding doctests (except Oracle).
1 parent 9f0e968 commit 79856b5

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

compose/testcontainers/compose/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class DockerCompose(object):
3131
3232
Example
3333
-------
34-
::
34+
.. doctest::
3535
3636
with DockerCompose("/home/project",
3737
compose_file_name=["docker-compose-1.yml", "docker-compose-2.yml"],

google/testcontainers/google/pubsub.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class PubSubContainer(DockerContainer):
2424
The :code:`pubsub` instance provides convenience methods :code:`get_publisher` and
2525
:code:`get_subscriber` to connect to the emulator without having to set the environment variable
2626
:code:`PUBSUB_EMULATOR_HOST`.
27-
::
27+
28+
.. doctest::
2829
2930
def test_docker_run_pubsub():
3031
config = PubSubContainer('google/cloud-sdk:emulators')

localstack/testcontainers/localstack/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class LocalStackContainer(DockerContainer):
3030
<testcontainers.localstack.LocalStackContainer object at 0x...>
3131
3232
The endpoint can be used to create a client with the boto3 library:
33-
::
33+
.. doctest::
3434
3535
dynamo_client = boto3.client("dynamodb", endpoint_url=dynamo_endpoint)
3636
scan_result = dynamo_client.scan(TableName='foo')

mysql/testcontainers/mysql/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class MariaDbContainer(MySqlContainer):
7777
7878
Example
7979
-------
80-
::
80+
.. doctest::
8181
8282
with MariaDbContainer("mariadb:latest") as mariadb:
8383
e = sqlalchemy.create_engine(mariadb.get_connection_url())

oracle/testcontainers/oracle/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class OracleDbContainer(DbContainer):
77
88
Example
99
-------
10-
::
10+
.. code-block::
1111
1212
>>> import sqlalchemy
1313
>>> from testcontainers.oracle import OracleDbContainer

0 commit comments

Comments
 (0)