Skip to main content

A more granular sub STEP for slash tests

Project description


Build Status Build Status
Supported Versions Supported Versions
Latest Version Latest Version

Create a more granular sub STEP for Slash tests.

Some scenarios can be long and complex, but you still want to have them as a single logical test. Steps allow to document subsections of a test, and also provide some handy hooks to perform actions inside a test (such as validations).

To continue the microwave example from Slash's docs:

from slash import g
from slash_step import STEP, hooks

def measure_temperature():
    if g.microwave.temperature > 180:
        logger.warn("Microwave is over heating!")

def test_cook_chicken():
    with STEP("Defrost chicken"):
        # ...
    with STEP("Cook"):
        # ...
    with STEP("Eat"):
        # Yum...
        assert g.chicken.is_cooked()

Project details

Download files

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

Source Distribution

slash_step-1.0.0.tar.gz (5.5 kB view hashes)

Uploaded source

Built Distribution

slash_step-1.0.0-py3-none-any.whl (4.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page