FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

testcontainers-python/core at reg_docs · Tranquility2/testcontainers-python · GitHub

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

testcontainers-core

testcontainers-core is the core functionality for spinning up Docker containers in test environments.

.. autoclass:: testcontainers.core.container.DockerContainer

.. autoclass:: testcontainers.core.image.DockerImage

Using DockerContainer and DockerImage directly:

>>> from testcontainers.core.container import DockerContainer
>>> from testcontainers.core.waiting_utils import wait_for_logs
>>> from testcontainers.core.image import DockerImage

>>> with DockerImage(path="./core/tests/image_fixtures/sample/", tag="test-sample:latest") as image:
...     with DockerContainer(str(image)) as container:
...         delay = wait_for_logs(container, "Test Sample Image")

Back | FazBrowse Home | New Git URL