[Python-checkins] gh-84461: Skip network require tests on Emscripten (GH-92383)
tiran
webhook-mailer at python.org
Fri May 6 06:08:46 EDT 2022
https://github.com/python/cpython/commit/cbc2c199a071d4d94b92c835324bf2ab721bb507
commit: cbc2c199a071d4d94b92c835324bf2ab721bb507
branch: main
author: Christian Heimes <christian at python.org>
committer: tiran <christian at python.org>
date: 2022-05-06T12:08:36+02:00
summary:
gh-84461: Skip network require tests on Emscripten (GH-92383)
files:
M Lib/test/test_robotparser.py
M Lib/test/test_socketserver.py
M Lib/test/test_timeout.py
diff --git a/Lib/test/test_robotparser.py b/Lib/test/test_robotparser.py
index 08bdf59d333d4..3821d66c2db7d 100644
--- a/Lib/test/test_robotparser.py
+++ b/Lib/test/test_robotparser.py
@@ -345,6 +345,7 @@ def testPasswordProtectedSite(self):
self.assertFalse(parser.can_fetch("*", robots_url))
+ at 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 c498d3d12e24a..2edb1e0c0e21e 100644
--- a/Lib/test/test_socketserver.py
+++ b/Lib/test/test_socketserver.py
@@ -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
diff --git a/Lib/test/test_timeout.py b/Lib/test/test_timeout.py
index 70a0175d77104..fa85c7e6cd87d 100644
--- a/Lib/test/test_timeout.py
+++ b/Lib/test/test_timeout.py
@@ -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__":
More information about the Python-checkins
mailing list