Skip to main content

A more granular sub STEP for slash tests

Project description

slash-step

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

@hooks.step_end.register
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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file slash_step-1.0.0.tar.gz.

File metadata

  • Download URL: slash_step-1.0.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.9

File hashes

Hashes for slash_step-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fcb3168f28ab704d62c04c3f50a28e37f819e8077080c01f7e1b0404e933b9f7
MD5 fd463ecfc1202d3aacd320393dc9e065
BLAKE2b-256 248fe31ac8bbdf47a21c4ed539a967fe323f04d0fbb269059672b572cbcfeb85

See more details on using hashes here.

File details

Details for the file slash_step-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: slash_step-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.9

File hashes

Hashes for slash_step-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ad979acae9893d375b5594991394352ffb048c0c50ea44067a118395479a694
MD5 bfab5ec21fa34163bf2c802a69bd4d82
BLAKE2b-256 ba951623b11805b876ebc0939f4a8fbefd7923f5dfba85ff31c2d20e3419193b

See more details on using hashes here.

Supported by

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