]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-84461: Skip network require tests on Emscripten (GH-92383)
authorChristian Heimes <christian@python.org>
Fri, 6 May 2022 10:08:36 +0000 (12:08 +0200)
committerGitHub <noreply@github.com>
Fri, 6 May 2022 10:08:36 +0000 (12:08 +0200)
Lib/test/test_robotparser.py
Lib/test/test_socketserver.py
Lib/test/test_timeout.py

index 08bdf59d333d4e8fa4bb7effe1e4367189471f93..3821d66c2db7d4b4ac966266db4d2730814311cb 100644 (file)
@@ -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/'
index c498d3d12e24a78c3e688a71d5f6a4b54b84b3a4..2edb1e0c0e21e2c0f1736258cfa0b5f472648a99 100644 (file)
@@ -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
index 70a0175d77104c9820f30d1961f3aaa8e7b0d069..fa85c7e6cd87d5bc8880084c86e91bf26bf05182 100644 (file)
@@ -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__":