Releases: srittau/python-asserts
Releases · srittau/python-asserts
Release 0.8.4
Improvements
fail()
is now marked withNoReturn
in type stub.
Bug Fixes
- Improve type annotations for Python 2.
Release 0.8.3
- Fix type signature of
AssertRaisesContext.__exit__()
.
Release 0.8.2
Improvements
- Add a py.typed file to signal that this package supports type hints.
Release 0.8.1
Bug Fixes
assert_raises_regex()
: Handle exceptions without any message correctly.
Release 0.8.0
API-Incompatible Changes
- Replace
msg
argument withmsg_fmt
in all assertions (exceptfail()
).
This allows you to customize error messages more easily than before, because
format()
with appropriate keyword arguments is now called on these
strings. See the documentation of individual assertions for the supported
arguments. - Replace AssertRaisesContext.msg and AssertWarnsContext.msg with msg_fmt.
- assert_almost_equal(), assert_not_almost_equal(): Place msg_fmt as third
argument.
API Additions
- assert_count_equal(): Add
msg_fmt
argument. - Add AssertRaisesErrnoContext, AssertRaisesRegexContext, and
AssertWarnsRegexContext.
Release 0.7.3
API Additions
- Add assert_not_almost_equal().
Improvements
- assert_almost_equal(): Raise ValueError if diff <= 0.
Bug Fixes
- assert_almost_equal() would never fail if a delta was supplied and the
second number was smaller than the first. - Use fail() instead of raise AssertionError in a few assertions.
Release 0.7.2
API Additions
- Add assert_warns() and assert_warns_regex().
Release 0.7.1
Distribute as wheel.
Release 0.7.0
- Add a stub file.
- Add assert_count_equal().
Release 0.6.0
Add assert_less(), assert_less_equal(), assert_greater(), assert_greater_equal(), assert_not_is_instance().