Prophepy
Python mocks made for humans. Heavily inspired by the great PHP's Prophecy.
Usage
from examples.calculator import Calculator
from examples.displayer import Displayer
from prophepy import prophesize
calculator = prophesize(Calculator)
displayer = Displayer(calculator._reveal())
calculator.add(2, 3)._should_be_called()
calculator.add(2, 3)._will_return(5)
displayer.display_add(2, 3)
calculator.check_prophecies()
Install
pip install prophepy
Tests
python -m unittest tests/test.py
Release files for prophepy 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| prophepy-0.0.4.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prophepy-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.7 kB
Release files / prophepy-0.0.4.tar.gz
| Download URL | prophepy-0.0.4.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9009ba16d06cfd7c4048864013198866b809fe5d05f7d0fd25699dde90734ad3
|
|
BLAKE2b-256 checksum How to use checksums |
b1f19e3a00ae4f13d6a8d4c1d3fb9c1cfb7d6ae813e71aea608136280d962018
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.11 CPython/3.7.2 Linux/4.14.98-1-MANJARO
|
Release files / prophepy-0.0.4-py3-none-any.whl
| Download URL | prophepy-0.0.4-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4730f163ccccceb2aaaa908c70a0192dd2992bbad171bb6d74aec27bdf09c9c
|
|
BLAKE2b-256 checksum How to use checksums |
16b27694e88ffac6ed0ee9c4cc363ab1481defd324cc2a91768cbc476315778c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.11 CPython/3.7.2 Linux/4.14.98-1-MANJARO
|