Skip to main content

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)

Source distribution for prophepy 0.0.4
File Size Uploaded
prophepy-0.0.4.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prophepy 0.0.4
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page