Thin wrapper around the python builtin unittest allowing developers to use the builtin assertions for non-unittest use cases.
Key Features:
Easy: Designed to make it be simple allowing developers to use the builtin unittest assertions for their own use cases.
Great Developer Experience: Being fully typed, documented, and tested makes it great for editor support and extension.
There is More!!!:
assertify: Simple, Flexible, and Extendable python3.6+ library to evaulate an expression and return True/False or raise an AssertionError or Exception.
assertify_predicates: Is an extension of Assertify which allows for assertifying predicates. This is useful for validating variables or user input.
descriptify: Descriptify is a library that contians helpful python descriptors. It uses assertify_predicates to validate various descriptors.
Installation
pipinstallunittest-assertions
Examples
fromunittest_assertions.identityimportAssertIsInstanceassert_is_instance=AssertIsInstance()assert_is_instance("example str",int)# raise TypeError("'example str' is not an instance of <class 'int'> : Raised a AssertionError")