(self)
| 1171 | "assert_warns does not preserver warnings state") |
| 1172 | |
| 1173 | def test_context_manager(self): |
| 1174 | |
| 1175 | before_filters = sys.modules['warnings'].filters[:] |
| 1176 | with assert_warns(UserWarning): |
| 1177 | warnings.warn("yo") |
| 1178 | after_filters = sys.modules['warnings'].filters |
| 1179 | |
| 1180 | def no_warnings(): |
| 1181 | with assert_no_warnings(): |
| 1182 | warnings.warn("yo") |
| 1183 | |
| 1184 | assert_raises(AssertionError, no_warnings) |
| 1185 | assert_equal(before_filters, after_filters, |
| 1186 | "assert_warns does not preserver warnings state") |
| 1187 | |
| 1188 | def test_args(self): |
| 1189 | def f(a=0, b=1): |
nothing calls this directly
no test coverage detected