We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b9a074 commit abcd6f0Copy full SHA for abcd6f0
Lib/test/test_sys.py
@@ -850,12 +850,8 @@ def test_sys_getwindowsversion_no_instantiation(self):
850
851
@test.support.cpython_only
852
def test_clear_type_cache(self):
853
- with warnings.catch_warnings(record=True) as w:
854
- warnings.simplefilter("always")
+ with self.assertWarnsRegex(DeprecationWarning, "sys._clear_type_cache() is deprecated"):
855
sys._clear_type_cache()
856
- self.assertEqual(len(w), 1)
857
- self.assertTrue(issubclass(w[0].category, DeprecationWarning))
858
- self.assertIn("_clear_type_cache", str(w[0].message))
859
860
@force_not_colorized
861
@support.requires_subprocess()
0 commit comments