Delayed/soft assertions for python
Delayed aka. Soft asserts for python
- No Dependenices on any other framework/library. - Should work with any testing framework. - Can be use as decorator or context manager.
Install via pip
pip install delayed-assert
Install from master
pip install git+https://github.com/pr4bh4sh/python-delayed-assert
ExampleUnittest.py for usage.
Using assertion library with lambda
Pass the assertion call as
While I've tested only with unittest asserttion,It should be able to use any assertion library.
Keep in mind that, Python does not support statement inside lambda, so
lambda: assert 1 == 1
won't work as it is not a valid lambda expression in python
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size delayed_assert-0.3.2-py3-none-any.whl (4.1 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size delayed_assert-0.3.2.tar.gz (2.7 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for delayed_assert-0.3.2-py3-none-any.whl