TestSlide
A test framework for Python that makes mocking and iterating over code with tests a breeze
What it is and what it does
TestSlide is a testing framework that layers strict mocking onto Python's unittest.TestCase, letting you write unit, TDD, and BDD tests with detailed validation. Its core feature is StrictMock—a mock object that validates both the calls made to it and the values passed in, catching bugs when code is first written and when it changes later. You can mock constructors and callables, set expected behavior, and get failure messages that guide you toward the fix. The framework works with existing unittest code without requiring refactoring, or you can use TestSlide's own test runner for a fresh start.
The package has no runtime dependencies and is actively maintained. It requires Linux and Python 3, and is distributed as a source tarball, which means installation may require build tools on your system. It has been in production use since 2018 and is MIT licensed.
Use it for:
- Write unit tests with strict mocks that validate both method calls and argument values to catch regressions early
- Mock constructors in integration tests to replace real clients with controlled test doubles
- Adopt TDD or BDD workflows in existing unittest codebases without rewriting test infrastructure
- Iterate quickly on code changes knowing that mock failure messages will guide you toward the correct implementation
- Validate that your code calls external dependencies with the exact arguments and frequency expected
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
TestSlide is a test framework for Python that provides strict mocks integrated with unittest.TestCase, enabling unit testing, TDD, and BDD with detailed validation and failure guidance.
Yes, if you're on Linux and willing to handle source distribution installation. TestSlide is actively maintained, MIT licensed, and well-suited for teams practicing TDD or BDD who want strict mock validation integrated into unittest. The high install friction is a minor concern given recent repository activity and lack of known vulnerabilities.
Install
testslide on PyPI
pip
pip install testslideuv
uv add testslidepoetry
poetry add testslideInstalling TestSlide
Before you install
Installation friction is high due to source distribution only. The package is actively maintained with recent commits and has been in production since 2018, though the last release was over a year ago.
License in practice
MIT license is permissive; you can use, modify, and distribute TestSlide freely in commercial and open-source projects with minimal restrictions.
Quickstart
pip install TestSlide
import testslide
class TestExample(testslide.TestCase):
def test_with_mock(self):
mock = testslide.StrictMock()
self.mock_callable(mock, 'method').to_return_value(True)
Requires Linux and Python 3; source distribution may require build tools.
Verify before relying
- Whether high install friction reflects build dependencies or packaging constraints not detailed in the fact sheet
- Whether the gap between last release and recent commits indicates development stalling or stable maintenance
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | actively maintained — 1,247 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 166,372/month — #10,496 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: TestSlide-2.7.1.tar.gz
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
assertsProvides stand-alone assertion functions for…
unclear · top 15,000 on PyPI
flexmockflexmock creates mock, stub, spy, and fake…
permissive · top 15,000 on PyPI
databricks-testProvides a unit testing framework for…
permissive · top 15,000 on PyPI
behavebehave is a behavior-driven development (BDD)…
permissive · top 5,000 on PyPI
expectsExpects is an assertion library for TDD/BDD…
permissive · top 15,000 on PyPI
asynctestExtends Python's unittest module with test…
permissive · top 5,000 on PyPI
tdd-guard-pytestA pytest plugin that captures test results and…
permissive · top 15,000 on PyPI
behave-djangoIntegrates Behave BDD testing into Django…
permissive · top 15,000 on PyPI
radish-bddradish is a Behavior Driven Development (BDD)…
permissive · top 15,000 on PyPI
testpathTestpath provides utilities for testing code…
permissive · top 5,000 on PyPI