Skip to content

Releases: srittau/python-asserts

Release 0.13.1

29 Apr 18:51
Compare
Choose a tag to compare
Release 0.13.1 Pre-release
Pre-release

Fixed

Fixed Python 3.12 deprecation warnings.

Release 0.13.0

13 Mar 16:08
Compare
Choose a tag to compare
Release 0.13.0 Pre-release
Pre-release

Added

  • Add support for Python 3.12.
  • Add Present and Absent for absence checks in assert_json_subset().

Removed

  • Drop support for Python 3.7.

Deprecated

  • Deprecate Exists in favor of Present and Absent in
    assert_json_subset().

Release 0.12.0

19 Oct 12:17
Compare
Choose a tag to compare
Release 0.12.0 Pre-release
Pre-release

Incompatible Changes

  • Drop support for Python 3.6.

API Additions

  • Add assert_not_regex().

Other Changes

  • Modernize the type stubs.

Release 0.11.1

27 Oct 14:53
Compare
Choose a tag to compare
Release 0.11.1 Pre-release
Pre-release

API Additions

  • assert_json_subset() can now check for the existence or non-existence
    of object members using the new Exists helper.
  • Non-string (or Exists) object member names in the first argument to
    assert_json_subset() now raise a TypeError.

Release 0.11.0

06 Oct 09:09
Compare
Choose a tag to compare
Release 0.11.0 Pre-release
Pre-release

API-Incompatible Changes

  • Drop support for Python 2.7 and 3.5.

Release 0.10.0

19 Oct 19:29
Compare
Choose a tag to compare
Release 0.10.0 Pre-release
Pre-release

API-Incompatible Changes

  • Drop support for Python 3.4.

API Additions

  • AssertRaisesContext and AssertWarnsContext now return themselves
    when __enter__() is called. By extension it now easier to call
    add_test() with assert_raises() et al:
with assert_raises(KeyError) as context:
    context.add_test(...)
    ...
  • Add AssertRaisesContext.exc_val property 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

23 Mar 15:22
Compare
Choose a tag to compare
Release 0.9.1 Pre-release
Pre-release

Improvements

  • AssertRaisesContext and sub-classes are now generic over the
    exception type.

Release 0.9.0

31 Aug 12:16
Compare
Choose a tag to compare
Release 0.9.0 Pre-release
Pre-release

API Additions

  • Add assert_json_subset().

Release 0.8.6

16 Aug 14:32
Compare
Choose a tag to compare
Release 0.8.6 Pre-release
Pre-release

Improvements

  • Add support for Python 3.7 (contributed by Frank Niessink).

Release 0.8.5

15 Aug 14:30
Compare
Choose a tag to compare
Release 0.8.5 Pre-release
Pre-release

API Additions

  • Add assert_dict_equal().
  • Add assert_dict_superset().

Improvements

  • assert_equal(): Use assert_dict_equal() if applicable.