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.

Files for cs.predicate, version 20210306
Filename, size File type Python version Upload date Hashes
Filename, size cs.predicate-20210306.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page