Skip to main content

A small assertion library for testing

Project description

Assertive

Assertive is a testing library that provides declarative assertions to you python tests.

Criteria

Criteria are declarative statements that can be used with assert statements to give a richer test experience.

assert 5 == is_greater_than(4)
assert 5 == is_odd()
assert 5 != is_even()

Criteria can also be composed with logical operators to give a richer experience in writing tests

assert 5 == is_greater_than(4) & is_less_than(6) # Using AND
assert 5 == is_even() | is_less_than(6) # Using OR
assert 5 == is_even() ^ is_odd() # Using XOR
assert 5 == ~is_even()  # Using INVERT

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

assertive-1.0.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

assertive-1.0.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file assertive-1.0.1.tar.gz.

File metadata

  • Download URL: assertive-1.0.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.10.17 Linux/6.8.0-1021-azure

File hashes

Hashes for assertive-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5e7a09ad4c186c85b820af6f862897ec3192bf264bd38bc5c71342454ad56d62
MD5 9a6d1c4430dd6b161267103294f84c18
BLAKE2b-256 b84e9dbdeee8d2da9482ff9e1f6e9dbddcec6f9ccec464bfb6696ecad6d2d732

See more details on using hashes here.

File details

Details for the file assertive-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: assertive-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.10.17 Linux/6.8.0-1021-azure

File hashes

Hashes for assertive-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 de0da22bf3442a896c0cc684058b3e31ac1cdba35ec7ec1db1362db97cfc95fb
MD5 cf960b3c54b2b275bac5f1c35121f0d3
BLAKE2b-256 20254df6ab7dc96b6a61da8d41eb5090bc856104215e73aab12bf877f99f62b4

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