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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
prophepy-0.0.4.tar.gz
(3.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prophepy-0.0.4.tar.gz.
File metadata
- Download URL: prophepy-0.0.4.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.11 CPython/3.7.2 Linux/4.14.98-1-MANJARO
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9009ba16d06cfd7c4048864013198866b809fe5d05f7d0fd25699dde90734ad3
|
|
| MD5 |
930f7c1227951e911cc06687241cf971
|
|
| BLAKE2b-256 |
b1f19e3a00ae4f13d6a8d4c1d3fb9c1cfb7d6ae813e71aea608136280d962018
|
File details
Details for the file prophepy-0.0.4-py3-none-any.whl.
File metadata
- Download URL: prophepy-0.0.4-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.11 CPython/3.7.2 Linux/4.14.98-1-MANJARO
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4730f163ccccceb2aaaa908c70a0192dd2992bbad171bb6d74aec27bdf09c9c
|
|
| MD5 |
33bf334672e1706386106e3c1addf755
|
|
| BLAKE2b-256 |
16b27694e88ffac6ed0ee9c4cc363ab1481defd324cc2a91768cbc476315778c
|