Assertion helpers for testing.
Approximate comparison for floating-point values.
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
Example:
Assert that code issues a warning.
---
Assert deprecation warning is issued.
Captures: DeprecationWarning, PendingDeprecationWarning, FutureWarning
DeprecationWarning
PendingDeprecationWarning
FutureWarning