skillfed

TestSlide

A test framework for Python that makes mocking and iterating over code with tests a breeze

testslide v2.7.1 166.4K downloads/30d#10,496 on PyPI148
Permissive license MIT Active released

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 testslide

uv

uv add testslide

poetry

poetry add testslide

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Topic :: Software Development :: TestingTopic :: Software Development :: Testing :: AcceptanceTopic :: Software Development :: Testing :: BDDTopic :: Software Development :: Testing :: MockingTopic :: Software Development :: Testing :: Unit

Tags

python mocking frameworkunittest with strict mockstest-driven development pythonmock validation testingbehavior-driven development pythonmock constructor librarypython tdd framework
mockingtddbdd

More Testing packages