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.2.0.tar.gz (10.5 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.2.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: assertive-1.2.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.18 Linux/6.11.0-1018-azure

File hashes

Hashes for assertive-1.2.0.tar.gz
Algorithm Hash digest
SHA256 674774fb5753710613632631b236c28f3aafd125860bd39b20af80938ec93892
MD5 3fcb22cd717bda9daadce73e84629eed
BLAKE2b-256 f1765ecd2d39b9e1bec10bf15b10a813cc8ba9b9e9254f55b4c7c09129fa486d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: assertive-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.18 Linux/6.11.0-1018-azure

File hashes

Hashes for assertive-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d52f429290f759d0ebed150a324ac3dce50aa47a3374718da6455878b717597
MD5 0be33e85ab3957a5d787b7e69453d5b8
BLAKE2b-256 e975502a698bee73b4446196e4ac5023caed613d0059ce858fcba1cf917b9705

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