A more granular sub STEP for slash tests
Project description
slash-step
Build Status | |
Supported Versions | |
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
Release history Release notifications | RSS feed
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.1.0.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file slash_step-1.1.0.tar.gz
.
File metadata
- Download URL: slash_step-1.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d441f7cd0791c3bc52d8a6e45a48024ecfbc7b85a1311bde463959974475b4b |
|
MD5 | 674090e0b19aa53483ad601b728d670d |
|
BLAKE2b-256 | d20aa4d94afd4d213087a377a2dc9ae980edbdd031d4a7a3b14f68d7a0171dce |
File details
Details for the file slash_step-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: slash_step-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afb651126b966d582a3040bee1a275024d33225eac22a0d70c9eaee6e55080d2 |
|
MD5 | fd7582136ab781594d4ce8a082592e31 |
|
BLAKE2b-256 | 38b975be1593d42185ddcdf3620932e6a31b01026b329273d92c9cdbaf0d56df |