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
Metadata
Release files for pytest-expecter 3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest_expecter-3.1.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_expecter-3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.7 kB
Release files / pytest_expecter-3.1.tar.gz
| Download URL | pytest_expecter-3.1.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
219a9a0042eb7b912f9854184b66ea658f513290c434ab0d6dba2a5899104e99
|
|
BLAKE2b-256 checksum How to use checksums |
73928a0b002c5638e5e943c0e62363020a14c6842bc552ce1c1a2d3c863c159a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.5 Darwin/24.6.0
|
Release files / pytest_expecter-3.1-py3-none-any.whl
| Download URL | pytest_expecter-3.1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b400425e9f65eacd49bfb6fed6d83e4482f58d3b22f7d353146ed513f12d60a2
|
|
BLAKE2b-256 checksum How to use checksums |
698b6f67bcbf3815c0388bf4771e01853fdc8486d64bc76201afc9bb34ea296e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.5 Darwin/24.6.0
|