()
| 60 | |
| 61 | |
| 62 | def test_warning_custom(): |
| 63 | with pytest.warns(m.CustomWarning) as excinfo: |
| 64 | value = m.warn_with_custom_type() |
| 65 | |
| 66 | assert issubclass(excinfo[0].category, DeprecationWarning) |
| 67 | assert str(excinfo[0].message) == "This is CustomWarning" |
| 68 | assert value == 37 |