fnctions for expressing predicates
Project description
Trite support for code predicates, presently just the context manager post_condition
.
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.
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
cs.predicate-20190221.tar.gz
(2.1 kB
view hashes)