Metadata-Version: 2.3
Name: slash-step
Version: 1.2.0
Summary: A more granular sub STEP for slash tests
Project-URL: Homepage, https://github.com/getslash/slash-step
Author-email: Omer Gertel <omer.gertel@gmail.com>
License: BSD 3-Clause License
License-File: LICENSE
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Requires-Dist: gossip
Requires-Dist: logbook>=1.2.0
Requires-Dist: slash>=0.7.0
Provides-Extra: testing
Requires-Dist: munch; extra == 'testing'
Requires-Dist: pylint; extra == 'testing'
Requires-Dist: pytest; extra == 'testing'
Description-Content-Type: text/markdown

slash-step
==========

|                       |                                                                                     |
|-----------------------|-------------------------------------------------------------------------------------|
| Build Status          | ![Build Status](https://github.com/getslash/slash-step/actions/workflows/main.yml/badge.svg?branch=master) |
| Supported Versions    | ![Supported Versions](https://img.shields.io/pypi/pyversions/slash-step.svg)        |
| Latest Version        | ![Latest Version](https://img.shields.io/pypi/v/slash-step.svg)                     |


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](https://slash.readthedocs.org/en/latest/index.html):

```python
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()
```

