Ignoring unrasiseable from offending libraries #8340
Unanswered
awichmann-mintel
asked this question in
Q&A
Replies: 1 comment 1 reply
-
If by "certain libraries" here you mean pytest rather than boto3, then you can ignore it by adding a If you mean boto3, there is no way to reliably filter ResourceWarnings from a specific module AFAIK. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
The new unraiseable exception feature in pytest 6.2 is throwing errors for unclosed resources in botocore. Since this is an ongoing issue, my team and I would like to ignore these warnings only from certain libraries.
Our best solution is to filter all ResourceWarnings from
_pytest
with thewarnings
module in a fixture like so...Is this advisable? Is there a way to target the module that is actually not cleaning up these resources?
edit: additionally, if this were possible, do you have any advice on how to test such a fixture silences the correct libraries?
Beta Was this translation helpful? Give feedback.
All reactions