assertpy
Simple assertion library for unit testing in python with a fluent API
Decision gist · record as of 2026-08-14
Yes, for existing projects already using it or for teams that prioritize assertion readability in test code. No, for new projects—the package is unmaintained since 2020 and shows no active development. Modern alternatives like pytest's built-in assertions or other actively maintained fluent libraries are safer choices for long-term codebases.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- High install friction due to source distribution format.
- Maintenance status is aging—last release was 2020-07-19, with no commits since 2025-06-15, indicating the project is no longer actively maintained despite Production/Stable classification.
License · maintenance · safety
BSD (permissive) — BSD permissive license means you can use, modify, and distribute the package freely in both open-source and commercial projects with minimal restrictions.
last release 2020-07-19 (2217 days) · last repo commit 2025-06-15 · 528 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 885,666 downloads/mo, #4,811 on PyPI
Alternatives
Verify before relying
pip install assertpy
from assertpy import assert_that
def test_example():
assert_that(1 + 2).is_equal_to(3)
assert_that('foobar').is_length(6).starts_with('foo')- Whether the package works reliably with modern Python versions beyond 3.8, given the last release was in 2020
- Current status of the conda-forge feedstock and whether conda installation remains viable
- Active maintenance status given the repository shows no recent commits despite being marked Production/Stable
What it is and what it does
assertpy is a lightweight assertion library that adds a fluent, chainable API on top of Python's standard assertions for unit testing. Instead of writing flat assert statements, you chain readable method calls like .is_equal_to(), .starts_with(), and .contains() to build expressive test conditions. It has no runtime dependencies and works with test runners like pytest and Nose.
The library was last released on 2020-07-19 and is classified as Production/Stable, but the project shows signs of age—the repository has not been actively maintained, and the latest classifiers only declare support up to Python 3.8. While it remains in the top popularity tier, relying on it for new projects means accepting that bug fixes and compatibility updates are unlikely.
Use it for
- Writing more readable unit tests with fluent assertion chains instead of nested assert statements
- Migrating from verbose unittest assertions to a cleaner, method-chaining style within pytest or Nose
- Testing collections and strings with readable predicates like .contains(), .starts_with(), .is_length()
- Building test suites where assertion readability is a priority for team maintainability
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, for existing projects already using it or for teams that prioritize assertion readability in test code.
No, for new projects—the package is unmaintained since 2020 and shows no active development. Modern alternatives like pytest's built-in assertions or other actively maintained fluent libraries are safer choices for long-term codebases.
Install
assertpy on PyPI
Before you install
High install friction due to source distribution format. Maintenance status is aging—last release was 2020-07-19, with no commits since 2025-06-15, indicating the project is no longer actively maintained despite Production/Stable classification.
License in practice
BSD permissive license means you can use, modify, and distribute the package freely in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install assertpy
from assertpy import assert_that
def test_example():
assert_that(1 + 2).is_equal_to(3)
assert_that('foobar').is_length(6).starts_with('foo')
Verify before relying
- Whether the package works reliably with modern Python versions beyond 3.8, given the last release was in 2020
- Current status of the conda-forge feedstock and whether conda installation remains viable
- Active maintenance status given the repository shows no recent commits despite being marked Production/Stable
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Aging 2,217 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 885,666 / month, #4,811 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software DevelopmentTopic :: Software Development :: Testing |
Evidence: assertpy-1.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 › “fluent assertions testing”
- assertpyProvides a fluent assertion API for writing readable unit test…
- surerSurer provides fluent, RSpec-inspired assertion syntax for Python…
- suresure provides fluent, chainable assertion syntax for Python testing,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also sure · ensure · surer · types-assertpy · PyHamcrest · asserts · expects · delayed-assert · re-assert · pytest-deepassert