expects
Expressive and extensible TDD/BDD assertion library for Python
Decision gist · record as of 2026-08-14
No. The package is dormant (last release 2018-10-25) and targets end-of-life Python versions (2.7, 3.5, 3.6, 3.7). Compatibility with later Python versions is unverified and likely broken. For modern TDD/BDD assertion libraries, consider actively maintained alternatives.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- The package targets Python 2.7, 3.5, 3.6, and 3.7; compatibility with later Python versions is unverified.
- Installation friction is high—the package is dormant (last release 2018-10-25, no updates in 2850 days) and carries classifiers for Python 2.7, 3.5, 3.6, and 3.7, making it a poor fit for modern Python environments.
- The repo is not archived but shows no active maintenance.
License · maintenance · safety
Apache 2.0 (permissive) — Licensed under Apache 2.0 (permissive), so you can use it freely in commercial and open-source projects without restriction, though the dormant status means no legal updates or security patches are forthcoming.
last release 2018-10-25 (2850 days) · last repo commit 2025-02-17 · 222 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 208,846 downloads/mo, #9,524 on PyPI
Alternatives
Verify before relying
pip install expects
from expects import expect, be_empty, equal
expect([]).to(be_empty)
expect('Foo').to(equal('Foo'))- Whether the package actually works on Python versions released after 3.7.
- Whether custom matchers can be defined and composed as the description suggests in practice.
- Current test coverage and whether the built-in matchers cover common assertion patterns.
What it is and what it does
Expects is a TDD/BDD assertion library that provides a fluent, composable syntax for writing test expectations. Instead of traditional assert statements, you use an `expect()` function paired with matchers (like `be_empty`, `equal`, `have_key`) chained with `.to()` or `.not_to()` to express what you expect from your code. The library supports combining matchers with `&` (and) and `|` (or) operators, and you can define custom matchers to extend its behavior.
The package has no runtime dependencies, making it lightweight to install. However, it is dormant—the last release was 2018-10-25, and it carries classifiers for Python 2.7, 3.5, 3.6, and 3.7, which are all end-of-life. No updates or security patches have been released in 2850 days, so using it on modern Python versions is risky and unsupported.
Use it for
- Writing readable BDD-style test assertions in test suites where fluent syntax improves clarity over raw assert statements.
- Defining custom matchers for domain-specific test assertions that are reusable across a test suite.
- Testing exception behavior with matchers like `raise_error` to verify that code fails as expected.
- Composing complex assertions on data structures (dicts, lists) using chainable matchers and logical operators.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is dormant (last release 2018-10-25) and targets end-of-life Python versions (2.7, 3.5, 3.6, 3.7). Compatibility with later Python versions is unverified and likely broken. For modern TDD/BDD assertion libraries, consider actively maintained alternatives.
Install
expects on PyPI
Before you install
Installation friction is high—the package is dormant (last release 2018-10-25, no updates in 2850 days) and carries classifiers for Python 2.7, 3.5, 3.6, and 3.7, making it a poor fit for modern Python environments. The repo is not archived but shows no active maintenance.
The package targets Python 2.7, 3.5, 3.6, and 3.7; compatibility with later Python versions is unverified.
License in practice
Licensed under Apache 2.0 (permissive), so you can use it freely in commercial and open-source projects without restriction, though the dormant status means no legal updates or security patches are forthcoming.
Quickstart
pip install expects
from expects import expect, be_empty, equal
expect([]).to(be_empty)
expect('Foo').to(equal('Foo'))
Verify before relying
- Whether the package actually works on Python versions released after 3.7.
- Whether custom matchers can be defined and composed as the description suggests in practice.
- Current test coverage and whether the built-in matchers cover common assertion patterns.
Package facts
| License | Apache 2.0 permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Dormant 2,850 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 208,846 / month, #9,524 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 :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: ImplementationProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules |
Evidence: expects-0.9.0.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 › “BDD testing matchers”
- expectsExpects is an assertion library for TDD/BDD that lets you write test…
- PyHamcrestPyHamcrest provides a framework for writing declarative matcher…
- pytest-bddpytest-bdd implements Gherkin-based behavior-driven development…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also surer · sure · ensure · assertpy · great-expectations · great-expectations-experimental · busypie · spark-expectations · TestSlide · delayed-assert