From: Christian Heimes Date: Fri, 6 May 2022 10:08:36 +0000 (+0200) Subject: gh-84461: Skip network require tests on Emscripten (GH-92383) X-Git-Tag: v3.11.0b1~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbc2c199a071d4d94b92c835324bf2ab721bb507;p=thirdparty%2FPython%2Fcpython.git gh-84461: Skip network require tests on Emscripten (GH-92383) --- diff --git a/Lib/test/test_robotparser.py b/Lib/test/test_robotparser.py index 08bdf59d333d..3821d66c2db7 100644 --- a/Lib/test/test_robotparser.py +++ b/Lib/test/test_robotparser.py @@ -345,6 +345,7 @@ class PasswordProtectedSiteTestCase(unittest.TestCase): self.assertFalse(parser.can_fetch("*", robots_url)) +@support.requires_working_socket() class NetworkTestCase(unittest.TestCase): base_url = 'http://www.pythontest.net/' diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index c498d3d12e24..2edb1e0c0e21 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -21,6 +21,8 @@ from test.support import threading_helper test.support.requires("network") +test.support.requires_working_socket(module=True) + TEST_STR = b"hello world\n" HOST = socket_helper.HOST diff --git a/Lib/test/test_timeout.py b/Lib/test/test_timeout.py index 70a0175d7710..fa85c7e6cd87 100644 --- a/Lib/test/test_timeout.py +++ b/Lib/test/test_timeout.py @@ -5,9 +5,6 @@ import unittest from test import support from test.support import socket_helper -# This requires the 'network' resource as given on the regrtest command line. -skip_expected = not support.is_resource_enabled('network') - import time import errno import socket @@ -292,6 +289,7 @@ class UDPTimeoutTestCase(TimeoutTestCase): def setUpModule(): support.requires('network') + support.requires_working_socket(module=True) if __name__ == "__main__":