Releases: srittau/python-asserts
Releases · srittau/python-asserts
Release 0.13.1
Fixed
Fixed Python 3.12 deprecation warnings.
Release 0.13.0
Added
- Add support for Python 3.12.
- Add
PresentandAbsentfor absence checks inassert_json_subset().
Removed
- Drop support for Python 3.7.
Deprecated
- Deprecate
Existsin favor ofPresentandAbsentin
assert_json_subset().
Release 0.12.0
Incompatible Changes
- Drop support for Python 3.6.
API Additions
- Add
assert_not_regex().
Other Changes
- Modernize the type stubs.
Release 0.11.1
API Additions
assert_json_subset()can now check for the existence or non-existence
of object members using the newExistshelper.- Non-string (or
Exists) object member names in the first argument to
assert_json_subset()now raise aTypeError.
Release 0.11.0
API-Incompatible Changes
- Drop support for Python 2.7 and 3.5.
Release 0.10.0
API-Incompatible Changes
- Drop support for Python 3.4.
API Additions
AssertRaisesContextandAssertWarnsContextnow return themselves
when__enter__()is called. By extension it now easier to call
add_test()withassert_raises()et al:
with assert_raises(KeyError) as context:
context.add_test(...)
...- Add
AssertRaisesContext.exc_valproperty to access the caught
exception after leaving the context manager:
with assert_raises(KeyError) as context:
...
assert_equal("expected message", str(context.exc_val))Release 0.9.1
Improvements
AssertRaisesContextand sub-classes are now generic over the
exception type.
Release 0.9.0
API Additions
- Add
assert_json_subset().
Release 0.8.6
Improvements
- Add support for Python 3.7 (contributed by Frank Niessink).
Release 0.8.5
API Additions
- Add
assert_dict_equal(). - Add
assert_dict_superset().
Improvements
assert_equal(): Useassert_dict_equal()if applicable.