You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4bd97e0
Browse filesBrowse the repository at this point in the historyBrowse files
The tests used `warnings.catch_warnings()` blocks for two different
things, now done by the `frequenz.core.warnings` helper made for each:
* An "ignore" filter, to call deprecated APIs the test needs as setup,
becomes `ignoring_deprecations()`, like in the library.
* An "error" filter, to check that a replacement API doesn't go through
a deprecated one, becomes `asserting_no_deprecations()`. It records
the warnings instead of raising them inside the code under test, so a
broad `except` there can't swallow the failure, and it reports every
offending warning with its location when the block ends.
The blocks that record warnings to check what a helper lets through are
left alone: that is what `catch_warnings(record=True)` is for.
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
0 commit comments