gh-84461: Skip network require tests on Emscripten (GH-92383)

This commit is contained in:
Christian Heimes 2022-05-06 12:08:36 +02:00 committed by GitHub
parent 291945bc6e
commit cbc2c199a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -345,6 +345,7 @@ def testPasswordProtectedSite(self):
self.assertFalse(parser.can_fetch("*", robots_url))
@support.requires_working_socket()
class NetworkTestCase(unittest.TestCase):
base_url = 'http://www.pythontest.net/'

View file

@ -21,6 +21,8 @@
test.support.requires("network")
test.support.requires_working_socket(module=True)
TEST_STR = b"hello world\n"
HOST = socket_helper.HOST

View file

@ -5,9 +5,6 @@
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 @@ def testRecvfromTimeout(self):
def setUpModule():
support.requires('network')
support.requires_working_socket(module=True)
if __name__ == "__main__":