Skip to content

Commit abcd6f0

Browse files
committed
Address review comments
1 parent 9b9a074 commit abcd6f0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Lib/test/test_sys.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -850,12 +850,8 @@ def test_sys_getwindowsversion_no_instantiation(self):
850850

851851
@test.support.cpython_only
852852
def test_clear_type_cache(self):
853-
with warnings.catch_warnings(record=True) as w:
854-
warnings.simplefilter("always")
853+
with self.assertWarnsRegex(DeprecationWarning, "sys._clear_type_cache() is deprecated"):
855854
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))
859855

860856
@force_not_colorized
861857
@support.requires_subprocess()

0 commit comments

Comments
 (0)