Skip to main content

Hamcrest matchers for mock objects.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matchmock-2.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

matchmock-2.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file matchmock-2.1.0.tar.gz.

File metadata

  • Download URL: matchmock-2.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for matchmock-2.1.0.tar.gz
Algorithm Hash digest
SHA256 a5ee2f8ed2c49c71455cfeca765fa49d86271b6ebf4708b9a0fed5e69aa5d3dc
MD5 bbf97c2ac3cec5841aabe403e0e8f86b
BLAKE2b-256 616dcee038b12e57494501868e2825877f9349d64d876473310683357d0b5693

See more details on using hashes here.

File details

Details for the file matchmock-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: matchmock-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for matchmock-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80df89c62f891e82ac20c42fd7147018d79d465c7fab09afd37f43b673ccef01
MD5 f2b3ebebf33268a48dc7413a7dbc9e84
BLAKE2b-256 22c462eeb03aed60349315056180afad91855996790fd437489e5eb95bdd17dd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page