Skip to main content

matchmock

PyPI Version Build Status Coverage Status

Hamcrest matchers for mock objects.

Starting from version 2.0.0 python2 is no longer supported the 1.x series will remain supported but no new features will be added.

Example

    f = Mock()
    f.method('foo', 'bar')

    assert_that(f.method, called_once_with(anything(), 'bar')

Matchers

  • called - match mock that was called one or more times
  • not_called - match mock that was never called
  • called_once - match mock that was called once regardless of arguments
  • called_with - match mock has at least one call with the specified arguments
  • called_once_with - match mock that was called once and with the specified arguments
  • called_n_times - match mock that was called number of times.

Metadata

Release files for matchmock 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matchmock 2.1.1
File Size Uploaded
matchmock-2.1.1.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for matchmock 2.1.1
File Interpreter ABI Platform
matchmock-2.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / matchmock-2.1.1.tar.gz

Download URL matchmock-2.1.1.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3b65b79a9d3bcf35ffcb9f7c7f8f804e0ab8ce2d32b7308ab91e964d12470479
BLAKE2b-256 checksum
How to use checksums
e8ef502b2eba4e29f75c53457fc4d15211db240fd8a19bbcc0b945e7e1e09da3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release files / matchmock-2.1.1-py3-none-any.whl

Download URL matchmock-2.1.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f063a61784a07f31d84ad5715db140c86240219509d79e3cc7500fe6190ee645
BLAKE2b-256 checksum
How to use checksums
a00508f68c7c53756827cd3867ae60bdd9b5ec2f8c9c28a85e12022b7b2b1986
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release history Release notifications | RSS feed

This release

2.1.1 This release

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.0

2 release files

0.7.1

2 release files

0.7.0

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page