django-rainbowtests
This is a custom test runner for Django that gives you really colorful test output.
Installation
Install the latest release with:
pip install django-rainbowtests
Or with uv:
uv add django-rainbowtests
Usage
Set your test runner in Django settings:
TEST_RUNNER = "rainbowtests.test.runner.RainbowDiscoverRunner"
Then run your tests as usual:
python manage.py test
All of Django's test flags still work: --buffer, --durations, --shuffle, --failfast, and so on.
--pdb and --debug-sql use Django's own result classes, so their output is not colorized.
Settings
RAINBOWTESTS_HIGHLIGHT_PATH
While running your tests, any lines in your tracebacks that match this path will be highlighted, making them easier to find and read. If you omit this setting, the default is to use the path to your Django installation.
RAINBOWTESTS_HIGHLIGHT_PATH = "/path/to/my/project/"
RAINBOWTESTS_SHOW_MESSAGES
If the test output is too verbose and you just want a colorful version of the standard Django test output, set RAINBOWTESTS_SHOW_MESSAGES to False:
RAINBOWTESTS_SHOW_MESSAGES = False
Python/Django Compatibility
| Django | Python |
|---|---|
| 5.2 LTS | 3.11, 3.12, 3.13, 3.14 |
| 6.0 | 3.12, 3.13, 3.14 |
| 6.1 | 3.12, 3.13, 3.14, 3.15 |
Every combination above is tested in CI.
Coverage
There is support for coverage via a custom test runner:
TEST_RUNNER = "rainbowtests.test.runner.RainbowDiscoverCoverageRunner"
Run your tests as normal (python manage.py test), and if you have coverage installed, you should see a report when your tests complete.
Note: The recommended modern workflow is to use coverage run manage.py test directly, which gives you more control over coverage settings.
Development
This project uses uv and a Makefile.
git clone https://github.com/bradmontgomery/django-rainbowtests.git
cd django-rainbowtests
make install # uv sync --locked --all-groups
make check # ruff lint + format check, ty type check, tests
| Target | What it does |
|---|---|
make test |
pytest; fails below 100% line + branch coverage |
make lint |
ruff check + ruff format --check |
make format |
auto-fix lint issues and format |
make typecheck |
ty type check |
make build |
build sdist + wheel into dist/ |
Releasing
- Bump
__version__inrainbowtests/__init__.pyand updateCHANGELOG.md. - Tag and push:
git tag 1.0.0 && git push origin 1.0.0. - The
publishworkflow runs the full CI suite, then publishes to PyPI with trusted publishing.
See CHANGELOG.md for release history.
License
MIT. See LICENSE.md.
Metadata
Release files for django-rainbowtests 1.0.0
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 | Actions |
|---|---|---|---|---|
| django_rainbowtests-1.0.0.tar.gz | 10.0 kB | With provenance | Details for django_rainbowtests-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_rainbowtests-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for django_rainbowtests-1.0.0-py3-none-any.whl |
Total release size: 18.3 kB
Release files / django_rainbowtests-1.0.0.tar.gz
| Download URL | django_rainbowtests-1.0.0.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bfac3e284a68e02255c56ff1e45bc646eb808747998b745723c008ab8d06fe2c
|
|
BLAKE2b-256 checksum How to use checksums |
4ed46bcc0404fe4f8131c63fa740ccfdcc5d6685e8efb6d5fb1b9849eabaff3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 26, 2026.
Transparency logRelease files / django_rainbowtests-1.0.0-py3-none-any.whl
| Download URL | django_rainbowtests-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
360a6e7ee85e11238bbc6738eef252495c391aa1f473f8af193a42fd8bb346ca
|
|
BLAKE2b-256 checksum How to use checksums |
51102e49faf05ead93f05074c5a9717f5cd67947d212b98476ba4e8cc0557e9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 26, 2026.
Transparency logSecurity for django-rainbowtests 1.0.0
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
Both files in this release have been uploaded with provenance metadata.
Attestation for django_rainbowtests-1.0.0.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 Nov 26, 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.