Test support.ignore_deprecations_from() silences warnings
(self)
| 76 | assert len(warnings._get_filters()) == orig_filter_len - 2 |
| 77 | |
| 78 | def test_ignored_deprecations_are_silent(self): |
| 79 | """Test support.ignore_deprecations_from() silences warnings""" |
| 80 | with warnings.catch_warnings(record=True) as warning_objs: |
| 81 | warnings_helper._warn_about_deprecation() |
| 82 | warnings.warn("You should NOT be seeing this.", DeprecationWarning) |
| 83 | messages = [str(w.message) for w in warning_objs] |
| 84 | self.assertEqual(len(messages), 0, messages) |
| 85 | |
| 86 | def test_import_module(self): |
| 87 | import_helper.import_module("ftplib") |
nothing calls this directly
no test coverage detected