Skip to main content

pytest-common-subject

pytest-common-subject PyPI version pytest-common-subject PyPI pyversions pytest-common-subject PyPI license

pytest-common-subject is a "framework" for organizing tests to reduce boilerplate while writing, improve skimmability when reading, and bolster parallelization when executing the suite.

To utilize this framework, we first choose a single function that our group of tests will all call — in other words, an entry point, or a common subject. This function will be automatically called before each of our tests, with args and kwargs that can be customized by overriding fixtures — enabling child test classes to make HTTP requests as a different user, or to use a different cache backend, or to change the value of a monkeypatched method.

The return value of the chosen function will be passed as a fixture to each test. To reap the full benefits of the framework, create separate tests to verify different aspects of the return value. Was the response status code a 200? Did the response contain the expected data? Were the expected rows created in the database? By using separate tests for each of these aspects, we can pinpoint and correct multiple bugs at once, instead of getting sucked into a fix-test-fix cycle with its chorus of "oh, bother, not again!"

Metadata

Release files for pytest-common-subject 1.1.2

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

Source distribution (sdist)

Source distribution for pytest-common-subject 1.1.2
File Size Uploaded Provenance
pytest_common_subject-1.1.2.tar.gz 9.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-common-subject 1.1.2
File Interpreter ABI Platform
pytest_common_subject-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / pytest_common_subject-1.1.2.tar.gz

Download URL pytest_common_subject-1.1.2.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7692ab6613e9d15498af3ad9551455d2983a512150a7b34ab16ccdcc76154323
BLAKE2b-256 checksum
How to use checksums
48e1096533cf47674ad61a491a2025f7dd615ece61e15d9a115a0dabaffd7fd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.10.19 Linux/6.8.0-85-generic

Release files / pytest_common_subject-1.1.2-py3-none-any.whl

Download URL pytest_common_subject-1.1.2-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3810b7445dc8b9ff732f6d9d898d8c7aa4939911eba6e365c68ad41f5c8c1c49
BLAKE2b-256 checksum
How to use checksums
84a9648451886a16515dd36b30bb3b204c2b81339fe502966a1608e003881406
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.10.19 Linux/6.8.0-85-generic

Security for pytest-common-subject 1.1.2

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.

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