rustest-django
Django integration for rustest: a port of pytest-django exposed as a rustest fixture module.
Goal: existing pytest-django test suites run under rustest with only an import-path swap.
Status
v1 is implemented and CI-verified: configuration resolution, the DB isolation engine,
the fixture-module entry point, the full T1/T2 fixture surface (client/rf, admin_*,
settings, mailoutbox, query-assertion helpers, DB lifecycle fixtures), the
unittest-style and unsupported-feature guards, rustest_django.asserts, and the
rustest_django.django_db class decorator. Not yet released to PyPI — see
#23.
The full design is written up in docs/spec.md, which links out to a
section per topic (configuration, DB isolation, the public API, async support, testing
and CI). It's a locked spec, not a proposal: every section there describes what's
actually built, not a plan. Rendered docs: https://rustest-django.readthedocs.io/en/latest/.
Using it
# pyproject.toml
[project]
dependencies = ["rustest-django"]
# conftest.py
rustest_fixtures = ["rustest_django"]
That's the whole integration surface. From there, an existing pytest-django test suite
runs by swapping pytest_django imports for rustest_django (see
docs/spec/api.md) and running rustest with
--pytest-compat if any test files still import pytest directly.
Example projects
examples/ has three self-contained Django projects proving the
name-swap claim for real, unmodified pytest-django test files:
minimal-sqlite: T1 core end to end.multi-db: thedatabases=marker kwarg and cross-database isolation.async-views:async_client/async_rfand DB access from async tests.
Each one runs its tests/ directory under both real pytest and
rustest --pytest-compat, and examples/compare_outcomes.py
diffs the two outcome sets exactly. CI runs this across every supported Python/Django/DB
combination (see .github/workflows/ci.yml).
Development
uv sync
uv run pre-commit install
See the Makefile for the common commands (make lint, make test, make build,
make parity-test).
Attribution
This project is a port of pytest-django, copyright (c) pytest-django contributors,
licensed under the BSD 3-Clause License. See LICENSE.
Metadata
Release files for rustest-django 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| rustest_django-0.0.1.tar.gz | 194.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rustest_django-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 212.5 kB
Release files / rustest_django-0.0.1.tar.gz
| Download URL | rustest_django-0.0.1.tar.gz |
|---|---|
| Size | 194.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a0fd054b337dc803b9e7cbec3cda99113b74f52db8c680d241c95eb89981f2b
|
|
BLAKE2b-256 checksum How to use checksums |
0d874c12cd74352be314871a38c39721b349fa7a3ec2069287b520eaa7777a07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / rustest_django-0.0.1-py3-none-any.whl
| Download URL | rustest_django-0.0.1-py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76c8c664bba676bd055fe1a5c9a0e929bf63a9cc6628f879961df8793017a8af
|
|
BLAKE2b-256 checksum How to use checksums |
ea317abb664bfbb85b37d7c21f263269e95b1a3f886a32a6b6cd30a33396c008
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logSecurity for rustest-django 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for rustest_django-0.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.