Readability Matters
Project description
Baby Steps
Installation
pip3 install baby-steps
Usage
from unittest.mock import Mock, call, sentinel
from baby_steps import given, when, then
def test_smth():
with given:
value = sentinel.smth
mock = Mock(return_value=value)
with when:
res = mock()
with then:
assert res == value
assert mock.mock_calls == [call()]
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
baby-steps-1.0.0.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for baby_steps-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aaa6cc6552177f80701f0971e32f12c4c13c6ef873e377aa8e05efe12d66eb98 |
|
MD5 | fe54249920c6897607f93cf46937cd97 |
|
BLAKE2b-256 | 2f25627fa7c8a831cd7d6e8a46b2dcc58b5ee1c4b31860f1044e07ea3a9115eb |