Skip to content

Commit cbc2c19

Browse files
authored
gh-84461: Skip network require tests on Emscripten (GH-92383)
1 parent 291945b commit cbc2c19

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Lib/test/test_robotparser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ def testPasswordProtectedSite(self):
345345
self.assertFalse(parser.can_fetch("*", robots_url))
346346

347347

348+
@support.requires_working_socket()
348349
class NetworkTestCase(unittest.TestCase):
349350

350351
base_url = 'http://www.pythontest.net/'

Lib/test/test_socketserver.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222

2323
test.support.requires("network")
24+
test.support.requires_working_socket(module=True)
25+
2426

2527
TEST_STR = b"hello world\n"
2628
HOST = socket_helper.HOST

Lib/test/test_timeout.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
from test import support
66
from test.support import socket_helper
77

8-
# This requires the 'network' resource as given on the regrtest command line.
9-
skip_expected = not support.is_resource_enabled('network')
10-
118
import time
129
import errno
1310
import socket
@@ -292,6 +289,7 @@ def testRecvfromTimeout(self):
292289

293290
def setUpModule():
294291
support.requires('network')
292+
support.requires_working_socket(module=True)
295293

296294

297295
if __name__ == "__main__":

0 commit comments

Comments
 (0)