Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Container, DerivedContainer & Pod inherit from ParameterSet #216

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,24 @@ Breaking changes:
the runtime is not functional (`gh#238
<https://github.com/dcermak/pytest_container/pull/238>`_)

- Remove intermediate class ``container.ContainerBaseABC``

- :py:class:`~pytest_container.container.Container` and
:py:class:`~pytest_container.container.DerivedContainer` are no longer
dataclasses.
The biggest change due to that is that ``__dict___`` can no longer be used to
pass it directly into the constructor. To remedy this use case, we now provide
:py:meth:`~pytest_container.container.ContainerBase.dict` and
:py:meth:`~pytest_container.container.DerivedContainer.dict`.

Improvements and new features:

- :py:class:`~pytest_container.container.Container` and
:py:class:`~pytest_container.container.DerivedContainer` now inherit from
``pytest``'s ``ParameterSet`` and can thus be directly used for test
parametrization including
marks. :py:class:`~pytest_container.container.DerivedContainer` also inherits
all marks from the base containers.

Documentation:

Expand Down Expand Up @@ -97,16 +113,18 @@ Internal changes:
Breaking changes:

- add the parameter ``container_runtime`` to
:py:func:`~pytest_container.container.ContainerBaseABC.prepare_container` and
:py:func:`~pytest_container.container.ContainerBase.prepare_container` (was
``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.
- :py:func:`~pytest_container.container.ContainerBase.get_base` (was
``ContainerBaseABC.get_base``) no longer returns the recursive base but the
immediate base.


Improvements and new features:
Expand Down Expand Up @@ -153,9 +171,9 @@ Breaking changes:

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.
- Add :py:attr:`~pytest_container.container.ContainerBase.baseurl` (was
``ContainerBaseABC.baseurl``) property to get the registry url of the
container on which any currently existing container is based on.


Documentation:
Expand Down
2 changes: 1 addition & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extension-pkg-whitelist=
fail-on=missing-function-docstring,missing-class-docstring

# Specify a score threshold under which the program will exit with error.
fail-under=9.3
fail-under=9.8

# Interpret the stdin as a python script, whose filename needs to be passed as
# the module_or_package argument.
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,12 @@ ignore = [
[tool.ruff.lint.isort]
force-single-line = true
case-sensitive = true

[tool.pytest.ini_options]
xfail_strict = true
addopts = "--strict-markers"
markers = [
'secretleapmark',
'othersecretmark',
'secretpodmark',
]
Loading
Loading