Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python mocks made for humans

Project description


Python mocks made for humans. Heavily inspired by the great PHP's Prophecy.


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)



pip install prophepy


python -m unittest tests/

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for prophepy, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size prophepy-0.0.4-py3-none-any.whl (8.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size prophepy-0.0.4.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page