Skip to main content

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.

Project description

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>

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scenariotest-1.0.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file scenariotest-1.0.tar.gz.

File metadata

  • Download URL: scenariotest-1.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for scenariotest-1.0.tar.gz
Algorithm Hash digest
SHA256 aae88b9967cbd55b9b084e236f2fe3198d7b886428e88f51675a206fd44c35a1
MD5 b6086a851fb51bec1564b83d5523afe3
BLAKE2b-256 d53266d0ca49708ba058df4bc5905b283e046c13050cf35bb0af1afe1a12e63e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page