Plugin to help launch docker containers
This Pytest plugin was generated with Cookiecutter along with @hackebrot's Cookiecutter-pytest-plugin template.
- TODO
- docker-py
import pytest
from pytest_docker import AbstractDockerContainer
class RedisDockerContainer(AbstractDockerContainer):
image_name = 'redis'
@pytest.yield_fixture
def redis_container(docker_client):
container = RedisDockerContainer(docker_client)
container.start()
yield container
container.kill()
def test_redis_container_start(redis_container):
assert '6379' in redis_container.log
You can install "pytest-docker" via conda
$ conda install pytest-docker
- TODO
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
Distributed under the terms of the BSD-3 license, "pytest-docker" is free and open source software