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 details)

Uploaded Source

File details

Details for the file cs.predicate-20190221.tar.gz.

File metadata

  • Download URL: cs.predicate-20190221.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.8

File hashes

Hashes for cs.predicate-20190221.tar.gz
Algorithm Hash digest
SHA256 2e86362ea0d97285e9bdb6b266c1e5d14d34236589707846ada6f401ef9faaa9
MD5 71d5a0648f31aee05038dd2416bace23
BLAKE2b-256 b0516be442477e7948aa898f01b2431d2107735a9f522c071c14165fe954ee19

See more details on using hashes here.

Supported by

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