Skip to main content

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.

Release files for cs.predicate 20210306

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cs.predicate 20210306
File Size Uploaded
cs.predicate-20210306.tar.gz 2.6 kB Details

Release files / cs.predicate-20210306.tar.gz

Download URL cs.predicate-20210306.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cd1a28f90467f37deb8133cc2b8efdd70707b9577d822b4f3a89729e238fda23
BLAKE2b-256 checksum
How to use checksums
261dd8bfe1ce8a9295bbc0db3c9ecdb4c83727b3b4582e304c131e6518172f34
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

20210306 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page