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.0.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

matchmock-2.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: matchmock-2.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.1.3 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.9

File hashes

Hashes for matchmock-2.0.0.tar.gz
Algorithm Hash digest
SHA256 7bfb0111f1352f61fa975543943d2224ab1ed6d5ebf1a51feb27b3e3e12c25ed
MD5 d63618d0cd78e067f273a24e33c0bc7f
BLAKE2b-256 4a9bd09640c154e1586aeab565c76c0da3d2cf565ca930e7c75f3befdb5c3007

See more details on using hashes here.

File details

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

File metadata

  • Download URL: matchmock-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.1.3 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.9

File hashes

Hashes for matchmock-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e8293e579d61f8af86956aab1bbac0bb226afa544bcf1070d58c684e6d14c9a
MD5 a73b53ea8a6b7843251fc3e8da1b9863
BLAKE2b-256 2b47e8c5aa0be2e3fa923f5a4111d2764cd7b00635076426f5e8b4f3916b7c6c

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