Catch any warning on warns with no arg passed

This commit is contained in:
Olga Matoula
2021-05-15 15:15:43 +01:00
parent c516dba69a
commit 8b2f83772d
8 changed files with 45 additions and 11 deletions
+4
View File
@@ -0,0 +1,4 @@
Reducing confusion from `pytest.warns(None)` by:
- Allowing no arguments to be passed in order to catch any exception (no argument defaults to `Warning`).
- Emit a deprecation warning if passed `None`.