fnctions for expressing predicates
Project description
Trite support for code predicates, presently just the context manager post_condition.
Latest release 20210306: Package install_requires fix.
Interested people should also see the icontract module.
Function post_condition(*predicates)
Context manager to test post conditions.
Predicates may either be a tuple of (description,callable)
or a plain callable.
For the latter the description is taken from callable.__doc__
or str(callable).
Raises AssertionError if any predicates are false.
Release Log
Release 20210306: Package install_requires fix.
Release 20190221: One bugfix, other tiny changes.
Release 20160828: Use "install_requires" instead of "requires" in DISTINFO.
Release 20160827: Initial release with post_condition context manager.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file cs.predicate-20210306.tar.gz.
File metadata
- Download URL: cs.predicate-20210306.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd1a28f90467f37deb8133cc2b8efdd70707b9577d822b4f3a89729e238fda23
|
|
| MD5 |
5124b51a7dafd8ac0fce161685ab869f
|
|
| BLAKE2b-256 |
261dd8bfe1ce8a9295bbc0db3c9ecdb4c83727b3b4582e304c131e6518172f34
|