pytest-testcontainers-django 0.2.3__tar.gz → 0.2.4__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_django-0.2.3 → pytest_testcontainers_django-0.2.4}/CHANGELOG.md +31 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/PKG-INFO +5 -3
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/pyproject.toml +7 -3
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/src/pytest_testcontainers_django/plugin.py +24 -7
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/.gitignore +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/LICENSE +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/README.md +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/src/pytest_testcontainers_django/__init__.py +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/src/pytest_testcontainers_django/_types.py +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/src/pytest_testcontainers_django/config.py +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/src/pytest_testcontainers_django/containers.py +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/src/pytest_testcontainers_django/errors.py +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/src/pytest_testcontainers_django/injection.py +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/tests/__init__.py +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/tests/conftest.py +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/tests/test_config.py +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/tests/test_injection.py +0 -0
- {pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/tests/test_plugin.py +0 -0
|
@@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.4] - 2026-06-19
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- The plugin now actually works on its advertised `pytest >= 7.4` floor. The
|
|
15
|
+
rootdir-conftest preload (the mechanism that lets `register()` calls run
|
|
16
|
+
before pytest-django's hook) called the private `_loadconftestmodules`, which
|
|
17
|
+
**does not exist in pytest 7** — there the method is `_getconftestmodules`,
|
|
18
|
+
with a different signature and no `consider_namespace_packages` concept. On
|
|
19
|
+
pytest 7 the call raised `AttributeError`, was swallowed by the preload's
|
|
20
|
+
broad `except`, and the rootdir conftest was silently never preloaded, so
|
|
21
|
+
`register()`-based config and early env injection didn't take effect (6 tests
|
|
22
|
+
failed). The preload now dispatches on method presence: `_loadconftestmodules`
|
|
23
|
+
(with `consider_namespace_packages`) on pytest >= 8, falling back to
|
|
24
|
+
`_getconftestmodules(path, importmode, rootpath)` on pytest 7.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- Test matrix across pytest 7.x, 8.x and 9.x (Python 3.10–3.13), runnable
|
|
29
|
+
locally via `tox` (new `tox.ini`, `tox`/`tox-uv` added to the `dev` extra) and
|
|
30
|
+
mirrored in CI. The `py3.13 × pytest7` cell is excluded (pytest gained Python
|
|
31
|
+
3.13 support in 8.3). CI also splits linting into its own job.
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- Relaxed the pytest dependency cap from `<9` to `<10`, so the package installs
|
|
36
|
+
alongside pytest 9 (validated by the new matrix). Bumped the
|
|
37
|
+
`pytest-testcontainers` floor to `>= 0.2.0`, the release whose own pytest cap
|
|
38
|
+
was raised to `<10` (0.1.0 pinned `pytest < 9` and would otherwise block
|
|
39
|
+
pytest 9 transitively).
|
|
40
|
+
|
|
10
41
|
## [0.2.3] - 2026-06-01
|
|
11
42
|
|
|
12
43
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-testcontainers-django
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Bridge between pytest-testcontainers and pytest-django: starts the DB container before Django imports settings.
|
|
5
5
|
Project-URL: Homepage, https://github.com/iplweb/pytest-testcontainers-django
|
|
6
6
|
Project-URL: Repository, https://github.com/iplweb/pytest-testcontainers-django
|
|
@@ -49,8 +49,8 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
49
49
|
Classifier: Topic :: Software Development :: Testing
|
|
50
50
|
Requires-Python: >=3.10
|
|
51
51
|
Requires-Dist: pytest-django>=4
|
|
52
|
-
Requires-Dist: pytest-testcontainers<2,>=0.
|
|
53
|
-
Requires-Dist: pytest<
|
|
52
|
+
Requires-Dist: pytest-testcontainers<2,>=0.2
|
|
53
|
+
Requires-Dist: pytest<10,>=7.4
|
|
54
54
|
Requires-Dist: testcontainers<5,>=4.7
|
|
55
55
|
Requires-Dist: tomli>=2; python_version < '3.11'
|
|
56
56
|
Provides-Extra: baseline
|
|
@@ -62,6 +62,8 @@ Requires-Dist: pre-commit; extra == 'dev'
|
|
|
62
62
|
Requires-Dist: pytest-xdist; extra == 'dev'
|
|
63
63
|
Requires-Dist: redis>=4; extra == 'dev'
|
|
64
64
|
Requires-Dist: ruff; extra == 'dev'
|
|
65
|
+
Requires-Dist: tox-uv>=1; extra == 'dev'
|
|
66
|
+
Requires-Dist: tox>=4; extra == 'dev'
|
|
65
67
|
Provides-Extra: redis
|
|
66
68
|
Requires-Dist: redis>=4; extra == 'redis'
|
|
67
69
|
Description-Content-Type: text/markdown
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pytest-testcontainers-django"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.4"
|
|
8
8
|
description = "Bridge between pytest-testcontainers and pytest-django: starts the DB container before Django imports settings."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -43,9 +43,11 @@ classifiers = [
|
|
|
43
43
|
"Topic :: Software Development :: Testing",
|
|
44
44
|
]
|
|
45
45
|
dependencies = [
|
|
46
|
-
|
|
46
|
+
# Upper bound is a precautionary major-version cap, not a known break.
|
|
47
|
+
# Validated against pytest 7/8/9 by the tox + CI matrix before each bump.
|
|
48
|
+
"pytest >=7.4,<10",
|
|
47
49
|
"pytest-django >=4",
|
|
48
|
-
"pytest-testcontainers >=0.
|
|
50
|
+
"pytest-testcontainers >=0.2,<2",
|
|
49
51
|
"testcontainers >=4.7,<5",
|
|
50
52
|
"tomli >=2 ; python_version < '3.11'",
|
|
51
53
|
]
|
|
@@ -60,6 +62,8 @@ dev = [
|
|
|
60
62
|
"django >=4.2",
|
|
61
63
|
"django-environ",
|
|
62
64
|
"redis >=4",
|
|
65
|
+
"tox >=4",
|
|
66
|
+
"tox-uv >=1",
|
|
63
67
|
]
|
|
64
68
|
|
|
65
69
|
[project.urls]
|
|
@@ -196,14 +196,31 @@ def _preload_rootdir_conftest(early_config: pytest.Config) -> None:
|
|
|
196
196
|
pluginmanager = early_config.pluginmanager
|
|
197
197
|
rootpath = Path(getattr(early_config, "rootpath", Path.cwd()))
|
|
198
198
|
importmode = early_config.getoption("importmode", default="prepend")
|
|
199
|
-
|
|
199
|
+
# pytest changed its private conftest-loading API across majors, so we
|
|
200
|
+
# dispatch on method presence (feature detection) rather than a version
|
|
201
|
+
# number:
|
|
202
|
+
# * pytest >= 8.0 exposes ``_loadconftestmodules(path, importmode, rootpath,
|
|
203
|
+
# *, consider_namespace_packages)`` together with the matching ini option.
|
|
204
|
+
# * pytest 7.x has no such method; ``_getconftestmodules(path, importmode,
|
|
205
|
+
# rootpath)`` performs the same conftest-import side effect and has no
|
|
206
|
+
# namespace-packages concept (the ini does not exist there either).
|
|
207
|
+
loadconftestmodules = getattr(pluginmanager, "_loadconftestmodules", None)
|
|
200
208
|
try:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
209
|
+
if loadconftestmodules is not None:
|
|
210
|
+
loadconftestmodules(
|
|
211
|
+
rootpath,
|
|
212
|
+
importmode,
|
|
213
|
+
rootpath,
|
|
214
|
+
consider_namespace_packages=bool(
|
|
215
|
+
early_config.getini("consider_namespace_packages")
|
|
216
|
+
),
|
|
217
|
+
)
|
|
218
|
+
else:
|
|
219
|
+
pluginmanager._getconftestmodules( # type: ignore[attr-defined]
|
|
220
|
+
rootpath,
|
|
221
|
+
importmode,
|
|
222
|
+
rootpath,
|
|
223
|
+
)
|
|
207
224
|
except Exception as exc:
|
|
208
225
|
if _is_django_not_ready(exc):
|
|
209
226
|
# Expected at preload time: the conftest transitively imports code
|
|
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
|
{pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/tests/test_config.py
RENAMED
|
File without changes
|
{pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/tests/test_injection.py
RENAMED
|
File without changes
|
{pytest_testcontainers_django-0.2.3 → pytest_testcontainers_django-0.2.4}/tests/test_plugin.py
RENAMED
|
File without changes
|