pytest-like assertion helpers for testing.
Approximate floating-point comparisons:
Parameters:
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| expected | float/list/dict | - | Expected value |
expected
float/list/dict
| rel | float | 1e-6 | Relative tolerance |
rel
float
1e-6
| abs | float | 1e-12 | Absolute tolerance |
abs
1e-12
Test that code raises an exception:
| Parameter | Type | Description |
|-----------|------|-------------|
| expected_exception | type | Expected exception type |
expected_exception
type
| match | str/Pattern | Regex to match message |
match
str/Pattern
Test that code issues a warning:
Test for deprecation warnings:
Captures:
DeprecationWarning
PendingDeprecationWarning
FutureWarning