Registry / testing / asserts

asserts

JSON →
library0.14.0pypypi✓ verified 83d ago

A standalone assertions library providing a rich set of assertion functions beyond unittest, with support for JSON subset checking, datetime assertions, regex, and context managers. Current version 0.14.0, requires Python >=3.10, released irregularly.

pip install asserts
INSTALL
IMPORT
SIG · ASSERTS
A
asserts
testingpythonv0.14.0
Install
1.7s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.14.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

assert_almost_equal
from asserts import assert_almost_equal
from asserts import assert_equals
assert_between
from asserts import assert_between
assert_boolean_true
from asserts import assert_boolean_true

Basic usage: use assert_equals for equality, assert_raises as a context manager for exception testing.

from asserts import assert_equals, assert_raises def test_addition(): assert_equals(2 + 2, 4) with assert_raises(ValueError): int('abc')
Debug
Known issues
breakingPython 3.8 and 3.9 support dropped in 0.14.0. Requires Python >=3.10.
fix
Upgrade to Python 3.10+ or pin asserts<0.14.0.
affects: >=0.14.0
deprecatedExists is deprecated since 0.13.0; use Present or Absent instead.
fix
Replace Exists with Present for existence or Absent for non-existence.
affects: >=0.13.0
gotchaassert_raises and assert_warns are context managers, not decorators. Must use 'with' statement.
fix
Use 'with assert_raises(Exception):' pattern.
affects: all
breakingassert_datetime_about_now and assert_datetime_about_now_utc now raise AssertionError instead of TypeError for timezone-aware datetimes.
fix
Ensure datetime arguments are naive or adjust exception handling.
affects: >=0.14.0
Upgrade
Version history
0.14.0latest on PyPI · released Nov 17, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
asserts — pip install asserts · libregistry