Skip to main content

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)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page