Skip to content

Releases: ollipa/chainmock

v0.11.0

23 Mar 13:56
Compare
Choose a tag to compare

Added

  • Stubs with spec pass isinstance test with the spec object.

Changed

  • Raise an AttributeError if return_value or side_effect is called when
    spying.

Fixed

  • Fix spec defined as a list of strings fails with AttributeError.

Infrastructure

  • Add Pytest 8 to the test matrix.

v0.10.0

27 Jan 09:38
Compare
Choose a tag to compare

Added

  • Add Mock.get_mock method.
  • Add support for mocking class attributes.
  • Add support for mocking instance attributes.

Changed

  • Patch TextResult class instead of TextTestResult class in unittest
    integration.

Infrastructure

  • Add CI testing for Python 3.13.
  • Update Readthedocs configuration.

v0.9.0

15 Oct 12:04
Compare
Choose a tag to compare

Added

  • Add unittest integration.

Changed

  • Remove pytest from dependencies. Chainmock now works also with unittest
    so pytest is not a required dependency anymore.

Removed

  • Drop support for pytest v6.0 and v6.1.

Infrastructure

  • Add pypy3.10 to tox test run.

Documentation

  • Add overview, user guide, contributing and changelog sections to documentation.

v0.8.2

12 Feb 10:59
Compare
Choose a tag to compare
  • Raise an exception if non-callables are spied.

v0.8.1

20 Feb 04:23
Compare
Choose a tag to compare
  • Fix mocks leak to next test if pytest setup fails.

v0.8.0

07 Feb 02:17
Compare
Choose a tag to compare
  • Set name to unittest mocks for better error messages.
  • Raise AttributeError if async asserts called without AsyncMock.
  • Fix mocking chained async methods and properties.

v0.7.1

16 Jan 10:39
Compare
Choose a tag to compare
  • Export mock.AnyOf helper class

v0.7.0

16 Jan 10:38
Compare
Choose a tag to compare
  • Use force_property=True always with kwargs
  • Fix spying __init__ method fails

v0.6.0

16 Jan 05:00
Compare
Choose a tag to compare
  • Add support for mocking module variables
  • Add force_async parameter to Mock.mock method

v0.5.1

15 Jan 08:11
Compare
Choose a tag to compare
  • Return self when Mock is called directly