Skip to main content

This testing helper-class was taken from a gist written by github user ‘bigjason’. It combines a prototypical test case with a list of dictionaries (each a dict of keyword arguments) and transforms the two into a series of unittest-compatible test cases. The advantage of this approach is that an identical test can be applied to multiple scenarios with minimal repetition of code, while still having each scenario tested independently and reported to the user by the test runner.

Example of usage can be found in the file xunit.py, or on bigjason’s blog post which introduced the concept:

<http://www.bigjason.com/blog/scenario-testing-python-unittest/>

The original code this was based off of can be found on GitHub:

<https://gist.github.com/856821/8966346d8e50866eae928ababa86acea6504bcee>

Metadata

Release files for scenariotest 1.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 scenariotest 1.0
File Size Uploaded
scenariotest-1.0.tar.gz 2.2 kB Details

Release files / scenariotest-1.0.tar.gz

Download URL scenariotest-1.0.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
aae88b9967cbd55b9b084e236f2fe3198d7b886428e88f51675a206fd44c35a1
BLAKE2b-256 checksum
How to use checksums
d53266d0ca49708ba058df4bc5905b283e046c13050cf35bb0af1afe1a12e63e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

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