Pytest-container

Latest version: v0.4.2

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.4.2

---------------------

Breaking changes:


Improvements and new features:
- Add compatibility with podman 5


Documentation:


Internal changes:

0.4.1

--------------------

Breaking changes:


Improvements and new features:


Documentation:


Internal changes:

- fix imports for older pytest releases

0.4.0

---------------------

Breaking changes:

- add the parameter ``container_runtime`` to
:py:func:`~pytest_container.container.ContainerBaseABC.prepare_container` and
:py:func:`~pytest_container.build.MultiStageBuild.prepare_build`.

- deprecate the function ``pytest_container.container_from_pytest_param``,
please use
:py:func:`~pytest_container.container.container_and_marks_from_pytest_param`
instead.

- :py:func:`~pytest_container.container.ContainerBaseABC.get_base` no longer
returns the recursive base but the immediate base.


Improvements and new features:

- No longer depend on :command:`buildah` being installed when using
:command:`podman` to build container images.

- Allow to configure whether container images are always pulled before test runs
or whether cached images can be used via the environment variable
``PULL_ALWAYS`` (see :ref:`controlling-image-pulling-behavior`).

- Add attributes :py:attr:`~pytest_container.inspect.ContainerInspect.name` and
:py:attr:`~pytest_container.inspect.ContainerNetworkSettings.ip_address`
exposing the container's name & IP

- Add property
:py:attr:`~pytest_container.container.ContainerBase.extra_entrypoint_args` to
support appending arguments to the container launch command

- Add support for Python 3.12

- Add property :py:attr:`~pytest_container.inspect.PortForwarding.bind_ip`
to support binding to arbitrary IP addresses.

- Fix :py:attr:`~pytest_container.inspect.PortForwarding.host_port` being
ignored when picking the host port


Documentation:


Internal changes:

0.3.0

-------------------------

Breaking changes:

- Removed the function ``OciRuntimeABC.get_image_id_from_stdout`` as docker
buildx does not print the image digest to stdout when invoking
:command:`docker build`.


Improvements and new features:

- Add :py:attr:`~pytest_container.container.ContainerBaseABC.baseurl` property
to get the registry url of the container on which any currently existing
container is based on.


Documentation:


Internal changes:

- use ``--cidfile`` and ``--iidfile`` flags to get the container and image
hashes from files instead of stdout.

0.2.0

-----------------------------------------

Breaking changes:


Improvements and new features:

- Log the the output of :command:`$runtime logs $container` using Python's
logging framework for easier debugging

- Automatically set the image format to ``docker`` when using :command:`buildah`
if the base image is using ``HEALTHCHECK`` (with :command:`buildah` version
1.25 and later).

- Add support for Python 3.11

- Log the container's logs even if launching the container fails, e.g. due to a
failing ``HEALTHCHECK``.

Documentation:


Internal changes:

0.1.1

---------------------

This release only fixes the README.rst formatting. There are no functional
changes compared to 0.1.0.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.