callee
Argument matchers for unittest.mock
Decision gist · record as of 2026-08-14
No, unless you are maintaining legacy code already using callee or are locked to Python 2.6–3.7. The package is abandoned and its target Python versions are out of support. Modern Python test suites should use unittest.mock's built-in features or a maintained alternative.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires unittest.mock (built-in Python 3.3+) or the mock backport for Python 2.6–2.7.
- High install friction: the package is abandoned (last release 2019-12-24, last commit 2020-09-11) with no runtime dependencies.
- It targets Python 2.6 through 3.7 per classifiers, which are now well out of support.
License · maintenance · safety
BSD (permissive) — BSD license (permissive) places no restrictions on use, modification, or distribution in your own code.
last release 2019-12-24 (2425 days) · last repo commit 2020-09-11 · 90 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 157,059 downloads/mo, #10,767 on PyPI
Alternatives
Verify before relying
pip install callee
from callee import GreaterThan, InstanceOf, String
from unittest.mock import Mock
m = Mock()
m(42, some_obj, 'text')
m.assert_called_with(GreaterThan(0), InstanceOf(object), String())- Whether the package works reliably with modern Python versions (3.8+) despite classifiers only listing up to 3.7.
- Current state of the repository and whether it accepts patches or is truly unmaintained.
What it is and what it does
callee is a matcher library that sits on top of unittest.mock, letting you write more expressive assertions about what arguments a mock was called with. Instead of choosing between exact equality (which makes tests brittle) or ANY wildcards (which are too loose), you can use matchers like GreaterThan(0), InstanceOf(SomeClass), or String() to assert on properties of the arguments without handcrafting call_args checks.
The library has no runtime dependencies and is pure Python. It was last released in December 2019 and is no longer actively maintained. The repository is not archived, but there have been no commits since September 2020. It targets Python 2.6 through 3.7 according to its classifiers, making it primarily useful for legacy codebases or when you are constrained to older Python versions.
Use it for
- Write mock assertions that check argument types or ranges without over-specifying exact values.
- Reduce boilerplate in test code by replacing manual call_args inspection with readable matchers.
- Test functions that accept objects of a certain class without caring about their exact identity.
- Verify that numeric arguments fall within expected bounds or satisfy custom predicates.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No, unless you are maintaining legacy code already using callee or are locked to Python 2.6–3.7.
The package is abandoned and its target Python versions are out of support. Modern Python test suites should use unittest.mock's built-in features or a maintained alternative.
Install
callee on PyPI
Before you install
High install friction: the package is abandoned (last release 2019-12-24, last commit 2020-09-11) with no runtime dependencies. It targets Python 2.6 through 3.7 per classifiers, which are now well out of support. Use only if you are locked to an old Python version or an existing codebase already using it.
Requires unittest.mock (built-in Python 3.3+) or the mock backport for Python 2.6–2.7.
License in practice
BSD license (permissive) places no restrictions on use, modification, or distribution in your own code.
Quickstart
pip install callee
from callee import GreaterThan, InstanceOf, String
from unittest.mock import Mock
m = Mock()
m(42, some_obj, 'text')
m.assert_called_with(GreaterThan(0), InstanceOf(object), String())
Verify before relying
- Whether the package works reliably with modern Python versions (3.8+) despite classifiers only listing up to 3.7.
- Current state of the repository and whether it accepts patches or is truly unmaintained.
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 2,425 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 157,059 / month, #10,767 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Testing |
Evidence: callee-0.3.1.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mock argument matchers”
- calleeProvides argument matchers for unittest.mock that let you assert on…
- flake8-mock-specA flake8 plugin that enforces the use of the spec or spec_set…
- responsesMocks HTTP requests made by the requests library, allowing you to…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also mock · testfixtures · anys · PyHamcrest · asyncmock · pytest-mock · flake8-mock-spec · django-mock-queries · stubs · flexmock