Predicate-based equivalence testing
Project description
predeq
PredEq is a utility library for testing objects using an equivalence predicate.
At its core, the predeq(predicate) is an object which tests equal to X if predicate(X) returns True.
def test_my_api_returns_error():
response = get_reponse(...)
assert response == {
'result': 'error',
'message': predeq(lambda msg: isinstance(msg, str)),
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
predeq-0.0.2.tar.gz
(4.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 predeq-0.0.2.tar.gz.
File metadata
- Download URL: predeq-0.0.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38e7f31ed5fda7907315108ebf62dc0efad6eaea5cf9f6d643478746405db6c9
|
|
| MD5 |
f085c25430620ad389a3ba8f3ed576bf
|
|
| BLAKE2b-256 |
cee38215bd335ec4cfac96c7a067fca67d69e6ce930568eb0c17f87a11b7c12f
|
File details
Details for the file predeq-0.0.2-py3-none-any.whl.
File metadata
- Download URL: predeq-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afe1a43c987dc3abdc312667c32319efd4fd4f06567c1bdbbc82610c87dad462
|
|
| MD5 |
027fdf5fbaddbf45c6bf090ebd653fe7
|
|
| BLAKE2b-256 |
d1c6c7e98c390784fdbb5a950ad43c6b4ca3eb8f10282ab95f169e26f535e679
|