testcontainers-python
testcontainers-python copied to clipboard
Testcontainers is a Python library that providing a friendly API to run Docker container. It is designed to create runtime environment to use during your automatic tests.
Fix: #674 Changes: 1. Proper type hinting for ports bindings, support strings like `8080/tcp` or `8125/udp` 2. Backward compatible with `int` 3. More test coverage 4. Improve documentations regarding the...
Fix: https://github.com/testcontainers/testcontainers-python/issues/687 Users should not be required to load each env var manually if they have an env file. Added support for loading a dot-env file. Usage: ```python with DockerContainer("nginx:latest").with_env_file("my_env_file"):...
**Describe the bug** The `raise_on_exit` feature of `wait_for_logs` does not work as expected because it - considers the container "exited" when it is still in the "created" state immediately after...
method **get_container_host_ip(self)** in _testcontainers/core/container.py_ have the following code commented (you drive me crazy) and should be uncommented # # check testcontainers itself runs inside docker container # if inside_container() and...
**What are you trying to do?** Since the 11th of June, it is possible to [emulate azure eventhubs](https://learn.microsoft.com/en-us/azure/event-hubs/test-locally-with-event-hub-emulator?tabs=docker-linux-container). The intention of this enhancement is to implement an Azure Event Hubs...
**Describe the bug** A clear and concise description of what the bug is. What did you expect to happen? What happened instead? Method get_exposed_port type miss match: ```python @wait_container_is_ready() def...
Current examples for running a `DockerContainer` are all using `with DockerContainer` (3 examples out of 3). But this is not the right way when someone wants to add some custom...
Currently the docker socket path used by `ryuk` is not working for rootless docker. We need to manually set it through the `TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE` environment variable. When running locally the `DOCKER_HOST`...
**Describe the bug** When using kwargs in the Image API, the params are not passed into the `build` **To Reproduce** For example: ```python with DockerImage(path="./", tag="new:test", buildargs={"PIP_EXTRA_INDEX_URL": PIP_EXTRA_INDEX_URL}) as image:...
**Describe the bug** The current implementation for `MySqlContainer` to check if the database is running is like below: ```python wait_for_logs( self, re.compile(".*: ready for connections.*: ready for connections.*", flags=re.DOTALL |...