File ignore-resourcewarning-doctests.patch of Package python-tornado6.20260316050753

Index: tornado-6.5.5/tornado/util.py
===================================================================
--- tornado-6.5.5.orig/tornado/util.py
+++ tornado-6.5.5/tornado/util.py
@@ -441,5 +441,7 @@ else:
 def doctests():
     # type: () -> unittest.TestSuite
     import doctest
+    import warnings
+    warnings.simplefilter("ignore", ResourceWarning)
 
     return doctest.DocTestSuite()
Index: tornado-6.5.5/tornado/httputil.py
===================================================================
--- tornado-6.5.5.orig/tornado/httputil.py
+++ tornado-6.5.5/tornado/httputil.py
@@ -1295,6 +1295,8 @@ def encode_username_password(
 def doctests():
     # type: () -> unittest.TestSuite
     import doctest
+    import warnings
+    warnings.simplefilter("ignore", ResourceWarning)
 
     return doctest.DocTestSuite(optionflags=doctest.ELLIPSIS)
 
Index: tornado-6.5.5/tornado/iostream.py
===================================================================
--- tornado-6.5.5.orig/tornado/iostream.py
+++ tornado-6.5.5/tornado/iostream.py
@@ -1613,5 +1613,7 @@ class PipeIOStream(BaseIOStream):
 
 def doctests() -> Any:
     import doctest
+    import warnings
+    warnings.simplefilter("ignore", ResourceWarning)
 
     return doctest.DocTestSuite()
openSUSE Build Service is sponsored by