Skip to main content

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

cs.predicate-20210306.tar.gz (2.6 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