Skip to main content

anfema-django-testutils

The main intention of the anfema_django_testutils app is to provide a Django test runner which considers snapshot tests as well as code coverage and human-readable html test reports. Moreover, the test result Precondition Failure has been added.

This package integrates snapshottest as well as coverage.

Prerequisites

anfema_django_testutils is officially supported on:

  • Python >= 3.9
  • Django >= 3.2

Installation

$ pip install anfema-django-testutils

Setting up

Update your Django settings.py to use the anfema_django_testutils test runner:

# settings.py

INSTALLED_APPS = [
    ...
    "mathfilters",
    "anfema_django_testutils",
]

TEST_RUNNER = "anfema_django_testutils.runner.TestRunner"

For further information see the anfema_django_testutils documentation.

Usage

For writing test cases use the anfema_django_testutils.testcases.TestCase rather than the django.test.TestCase:

# app/tests.py

from anfema_django_testutils.testcases import TestCase


class CustomTest(TestCase):
    ...

Create documentation

To generate the anfema_django_testutils documentation from the local sources, run in a terminal:

$ pip install tox
$ tox -e docs -- docs/build

Run tests

To execute the anfema_django_testutils tests, run in a terminal:

$ pip install tox
$ tox

License

Licensed under the MIT-clause license; see LICENSE for details.

Metadata

Release files for anfema-django-testutils 0.8.0

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

Source distribution (sdist)

Source distribution for anfema-django-testutils 0.8.0
File Size Uploaded Provenance Actions
anfema_django_testutils-0.8.0.tar.gz 19.2 kB Without provenance Details for anfema_django_testutils-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anfema-django-testutils 0.8.0
File Interpreter ABI Platform Actions
anfema_django_testutils-0.8.0-py3-none-any.whl Python 3 none any Details for anfema_django_testutils-0.8.0-py3-none-any.whl

Total release size: 45.3 kB

Release files / anfema_django_testutils-0.8.0.tar.gz

Download URL anfema_django_testutils-0.8.0.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
84c4a6dc5a3440de81396d3b3f3d88ea29fb6b2f2c01c75c85c397bb41747323
BLAKE2b-256 checksum
How to use checksums
6e2e7aebbc64b9250dcb750ef17046ff32216cae530b5fbf3ce56ce32b41283b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / anfema_django_testutils-0.8.0-py3-none-any.whl

Download URL anfema_django_testutils-0.8.0-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f87c828cb49cbdfd14679fb7e1a180790745008295459a14d00a2500fc600054
BLAKE2b-256 checksum
How to use checksums
a94761739b7c5caeaba7a8a27ab35434a9076a8b013fd93d18f8677775798807
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for anfema-django-testutils 0.8.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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