Lines Matching refs:warnings
14 import warnings
29 orig_filter_len = len(warnings.filters)
36 assert len(warnings.filters) == orig_filter_len + 2
40 orig_filter_len = len(warnings.filters)
45 assert len(warnings.filters) == orig_filter_len - 2
48 """Test support.ignore_deprecations_from() silences warnings"""
49 with warnings.catch_warnings(record=True) as warning_objs:
51 warnings.warn("You should NOT be seeing this.", DeprecationWarning)
192 warnings = [str(w.message) for w in recorder.warnings]
198 self.assertEqual(len(warnings), 1, warnings)
199 warn = warnings[0]
266 warnings = [str(w.message) for w in recorder.warnings]
268 self.assertEqual(len(warnings), 1, warnings)
269 warn = warnings[0]
283 messages = [str(w.message) for w in recorder.warnings]