Overview
A pytest plugin based on garybernhardt/expecter to write expressive tests.
Quick Start
With this plugin you can write tests (optionally using pytest-describe) like this:
def describe_foobar():
def it_can_pass(expect):
expect(2 + 3) == 5
def it_can_fail(expect):
expect(2 + 3) == 6
and get output like this:
============================= FAILURES =============================
___________________ describe_foobar.it_can_fail ____________________
def it_can_fail(expect):
> expect(2 + 3) == 6
E AssertionError: Expected 6 but got 5
test_foobar.py:7: AssertionError
================ 1 failed, 1 passed in 2.67 seconds ================
Installation
Install it directly into an activated virtual environment:
$ pip install pytest-expecter
or add it to your Poetry project:
$ poetry add pytest-expecter
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytest_expecter-3.1.tar.gz
(6.0 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 pytest_expecter-3.1.tar.gz.
File metadata
- Download URL: pytest_expecter-3.1.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.14.5 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
219a9a0042eb7b912f9854184b66ea658f513290c434ab0d6dba2a5899104e99
|
|
| MD5 |
6094df78731d68eda1f876548f960049
|
|
| BLAKE2b-256 |
73928a0b002c5638e5e943c0e62363020a14c6842bc552ce1c1a2d3c863c159a
|
File details
Details for the file pytest_expecter-3.1-py3-none-any.whl.
File metadata
- Download URL: pytest_expecter-3.1-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.14.5 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b400425e9f65eacd49bfb6fed6d83e4482f58d3b22f7d353146ed513f12d60a2
|
|
| MD5 |
82b2dce15ea24896cdcff1593f9e8522
|
|
| BLAKE2b-256 |
698b6f67bcbf3815c0388bf4771e01853fdc8486d64bc76201afc9bb34ea296e
|