Skip to content

Commit f7d4ade

Browse files
committed
Add some more requires guards to tests
1 parent 406aa14 commit f7d4ade

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎Lib/test/test_warnings/__init__.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from test.support import import_helper
1616
from test.support import isolation
1717
from test.support import os_helper
18+
from test.support import threading_helper
1819
from test.support import warnings_helper
1920
from test.support import force_not_colorized
2021
from test.support.script_helper import assert_python_ok, assert_python_failure
@@ -1806,6 +1807,7 @@ def test_late_resource_warning(self):
18061807
self.assertStartsWith(err, expected)
18071808

18081809

1810+
@support.requires_working_socket()
18091811
class AsyncTests(BaseTest):
18101812
"""Verifies that the catch_warnings() context manager behaves
18111813
as expected when used inside async co-routines. This requires
@@ -1900,6 +1902,7 @@ class PyAsyncTests(AsyncTests, unittest.TestCase):
19001902
module = py_warnings
19011903

19021904

1905+
@threading_helper.requires_working_threading()
19031906
class ThreadTests(BaseTest):
19041907
"""Verifies that the catch_warnings() context manager behaves as
19051908
expected when used within threads. This requires that both the

0 commit comments

Comments
 (0)