pytest-testcontainers 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/CHANGELOG.md +11 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/PKG-INFO +1 -1
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/pyproject.toml +1 -1
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/__init__.py +1 -1
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/reuse.py +7 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_reuse.py +13 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/.gitignore +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/LICENSE +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/README.md +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/_internal/__init__.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/_internal/clean_session_admin.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/_internal/conn_info.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/_internal/docker_health.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/_internal/git_identity.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/_internal/port_resolver.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/containers.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/errors.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/fixtures.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/makers.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/plugin.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/conftest.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_disabled.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_disabled_fixture.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_docker_context.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_docker_not_running.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_errors.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_fixtures_clean_session_mongo.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_fixtures_clean_session_psql.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_fixtures_clean_session_redis.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_fixtures_session.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_git_identity.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_makers_generic.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_makers_mongo.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_makers_mysql.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_makers_naming.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_makers_no_docker.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_makers_postgres.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_makers_redis.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_naming_docker.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_plugin_options.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_port_resolver.py +0 -0
- {pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_reuse_mode.py +0 -0
|
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.2] - 2026-06-29
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Restored the `reuse_name_for` name in `pytest_testcontainers.reuse` as a
|
|
15
|
+
backward-compatible alias of `container_name_for`. The template-based
|
|
16
|
+
container-naming feature renamed the function, and 0.2.1 shipped that rename —
|
|
17
|
+
which broke `pytest-testcontainers-django` < 0.2.5 (it imports the old name)
|
|
18
|
+
at import time. The alias keeps existing installs working; the default
|
|
19
|
+
`reuse_mode=True` matches the old function's byte-stable behavior.
|
|
20
|
+
|
|
10
21
|
## [0.2.1] - 2026-06-29
|
|
11
22
|
|
|
12
23
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-testcontainers
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Named pytest fixtures and a maker convention on top of testcontainers-python.
|
|
5
5
|
Project-URL: Homepage, https://github.com/iplweb/pytest-testcontainers
|
|
6
6
|
Project-URL: Repository, https://github.com/iplweb/pytest-testcontainers
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pytest-testcontainers"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Named pytest fixtures and a maker convention on top of testcontainers-python."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
{pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/reuse.py
RENAMED
|
@@ -310,3 +310,10 @@ def container_name_for(
|
|
|
310
310
|
if not reuse_mode and "{rand}" not in template:
|
|
311
311
|
rendered = f"{rendered}-{rand}"
|
|
312
312
|
return finalize_name(rendered)
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
# Backward-compatible alias: ``container_name_for`` was named ``reuse_name_for``
|
|
316
|
+
# through 0.2.0. pytest-testcontainers-django < 0.2.5 still imports the old name
|
|
317
|
+
# from this module, so keep the alias to avoid breaking it on the rename. The
|
|
318
|
+
# default ``reuse_mode=True`` matches the old function's byte-stable behavior.
|
|
319
|
+
reuse_name_for = container_name_for
|
|
@@ -330,3 +330,16 @@ def test_container_name_for_explicit_rand_not_double_appended(
|
|
|
330
330
|
monkeypatch.setenv("PYTEST_TESTCONTAINERS_NAME_TEMPLATE", "{service}-{rand}")
|
|
331
331
|
name = container_name_for("psql", reuse_mode=False)
|
|
332
332
|
assert re.match(r"^psql-[0-9a-f]{4}$", name) # exactly one rand token
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
def test_reuse_name_for_backward_compat_alias(tmp_cwd) -> None:
|
|
336
|
+
"""``reuse_name_for`` was renamed to ``container_name_for`` in 0.2.1.
|
|
337
|
+
|
|
338
|
+
Keep a backward-compatible alias so pytest-testcontainers-django < 0.2.5
|
|
339
|
+
(which imports the old name) doesn't break on the rename.
|
|
340
|
+
"""
|
|
341
|
+
from pytest_testcontainers.reuse import reuse_name_for
|
|
342
|
+
|
|
343
|
+
assert reuse_name_for is container_name_for
|
|
344
|
+
# Old name's callers expect the byte-stable reuse name (reuse_mode=True).
|
|
345
|
+
assert reuse_name_for("psql") == container_name_for("psql", reuse_mode=True)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/containers.py
RENAMED
|
File without changes
|
{pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/errors.py
RENAMED
|
File without changes
|
{pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/fixtures.py
RENAMED
|
File without changes
|
{pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/makers.py
RENAMED
|
File without changes
|
{pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/src/pytest_testcontainers/plugin.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_testcontainers-0.2.1 → pytest_testcontainers-0.2.2}/tests/test_docker_not_running.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|