Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

rustest-django

Docs

Socket Badge

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.

Migrating an existing suite? Let Claude Code do the rewrite with the agent skills.

Status

The v1 supported tier is implemented and CI-verified: configuration resolution, the DB isolation engine, the fixture-module entry point, T1 core and selected T2 fixtures (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. The latest release, 0.0.2, is published on PyPI (the first was 0.0.1). "v1" names the implementation scope; the package uses independent pre-1.0 versions.

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), with completed follow-ups and remaining work. Published-package docs: https://rustest-django.readthedocs.io/en/stable/. Docs for unreleased main: https://rustest-django.readthedocs.io/en/latest/.

Release 0.0.2 also implements live server, serialized rollback and app-registry isolation, URL/template markers, django-configurations, and database suffixes. Project options support native TOML, compatible pytest TOML, and INI fallbacks. See Configuration and the remaining runner boundaries.

Using it

# pyproject.toml
[project]
dependencies = ["rustest-django"]
# conftest.py
rustest_fixtures = ["rustest_django"]

That's the whole integration surface. Within the supported tier, 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.

Agent skills

A coding agent can do the migration for you. Two agent skills help it work with rustest-django in your project:

Install both with skills.sh, which supports Claude Code and other agents:

npx skills add ernestomancebo/rustest-django

Ask by name so the right skill loads, for example "Use rustest-django-migrate-tests to migrate these tests" or "Use rustest-django-doctor to explain this failure". See Agent skills.

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: the databases= marker kwarg and cross-database isolation.
  • async-views: async_client/async_rf and 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.3rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rustest-django 0.0.3rc1
File Size Uploaded Provenance
rustest_django-0.0.3rc1.tar.gz 247.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for rustest-django 0.0.3rc1
File Interpreter ABI Platform
rustest_django-0.0.3rc1-py3-none-any.whl Python 3 none any Details

Total release size: 275.6 kB

Release files / rustest_django-0.0.3rc1.tar.gz

Download URL rustest_django-0.0.3rc1.tar.gz
Size 247.2 kB
Tags Source
SHA-256 checksum
How to use checksums
216d759d452046c59f66886d910932c2fb5c440642c1acf6f8f0d315e7273838
BLAKE2b-256 checksum
How to use checksums
e1978841e961b0e54fc92a4abab6bd83af96ca20e039603a27af2438e907d460
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 Oct 20, 2026.

Transparency log

Release files / rustest_django-0.0.3rc1-py3-none-any.whl

Download URL rustest_django-0.0.3rc1-py3-none-any.whl
Size 28.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90233fe078738f15fb9ff9903c54239262e732e4ec652910bec0655c8315f5e0
BLAKE2b-256 checksum
How to use checksums
bdffc3c351eb1df4e9862f3c2494ddb3b0927c1cb9e592aee43d4b1d635d18d5
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 Oct 20, 2026.

Transparency log

Security for rustest-django 0.0.3rc1

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.

Select from 2 files

Attestation for rustest_django-0.0.3rc1.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 Oct 20, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page