Get the warning to fire every time
@@ -534,6 +534,8 @@ class TestUtil(unittest.TestCase):
ssl_.HAS_SNI = False
with pytest.warns(SNIMissingWarning):
+ with warnings.catch_warnings():
+ warnings.simplefilter("always")
ssl_wrap_socket(ssl_context=mock_context, sock=socket)
ssl_.HAS_SNI = HAS_SNI
