diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-09-05 14:56:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 14:56:30 (GMT) |
commit | 1e0d62793a84001e92f1c80b511d3a212b435acc (patch) | |
tree | 0735827fe13611176e9dc41cdacde06dba79be7b /Lib/test/test_urllib2net.py | |
parent | f980cc19b9cafc09ef21e906871f810a1c89e62f (diff) | |
download | cpython-1e0d62793a84001e92f1c80b511d3a212b435acc.zip cpython-1e0d62793a84001e92f1c80b511d3a212b435acc.tar.gz cpython-1e0d62793a84001e92f1c80b511d3a212b435acc.tar.bz2 |
gh-108416: Mark slow but not CPU bound test methods with requires_resource('walltime') (GH-108480)
Diffstat (limited to 'Lib/test/test_urllib2net.py')
-rw-r--r-- | Lib/test/test_urllib2net.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py index d8d882b..f0874d8 100644 --- a/Lib/test/test_urllib2net.py +++ b/Lib/test/test_urllib2net.py @@ -133,6 +133,7 @@ class OtherNetworkTests(unittest.TestCase): # XXX The rest of these tests aren't very good -- they don't check much. # They do sometimes catch some major disasters, though. + @support.requires_resource('walltime') def test_ftp(self): # Testing the same URL twice exercises the caching in CacheFTPHandler urls = [ @@ -196,6 +197,7 @@ class OtherNetworkTests(unittest.TestCase): self.assertEqual(res.geturl(), "http://www.pythontest.net/index.html#frag") + @support.requires_resource('walltime') def test_redirect_url_withfrag(self): redirect_url_with_frag = "http://www.pythontest.net/redir/with_frag/" with socket_helper.transient_internet(redirect_url_with_frag): @@ -334,6 +336,7 @@ class TimeoutTest(unittest.TestCase): FTP_HOST = 'ftp://www.pythontest.net/' + @support.requires_resource('walltime') def test_ftp_basic(self): self.assertIsNone(socket.getdefaulttimeout()) with socket_helper.transient_internet(self.FTP_HOST, timeout=None): @@ -352,6 +355,7 @@ class TimeoutTest(unittest.TestCase): socket.setdefaulttimeout(None) self.assertEqual(u.fp.fp.raw._sock.gettimeout(), 60) + @support.requires_resource('walltime') def test_ftp_no_timeout(self): self.assertIsNone(socket.getdefaulttimeout()) with socket_helper.transient_internet(self.FTP_HOST): @@ -363,6 +367,7 @@ class TimeoutTest(unittest.TestCase): socket.setdefaulttimeout(None) self.assertIsNone(u.fp.fp.raw._sock.gettimeout()) + @support.requires_resource('walltime') def test_ftp_timeout(self): with socket_helper.transient_internet(self.FTP_HOST): u = _urlopen_with_retry(self.FTP_HOST, timeout=60) |