mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-108416: Mark slow but not CPU bound test methods with requires_resource('walltime') (GH-108480)
This commit is contained in:
parent
f980cc19b9
commit
1e0d62793a
18 changed files with 48 additions and 3 deletions
|
@ -10,7 +10,7 @@ import calendar
|
|||
import threading
|
||||
import socket
|
||||
|
||||
from test.support import verbose, run_with_tz, run_with_locale, cpython_only
|
||||
from test.support import verbose, run_with_tz, run_with_locale, cpython_only, requires_resource
|
||||
from test.support import hashlib_helper
|
||||
from test.support import threading_helper
|
||||
import unittest
|
||||
|
@ -456,6 +456,7 @@ class NewIMAPTestsMixin():
|
|||
with self.imap_class(*server.server_address):
|
||||
pass
|
||||
|
||||
@requires_resource('walltime')
|
||||
def test_imaplib_timeout_test(self):
|
||||
_, server = self._setup(SimpleIMAPHandler)
|
||||
addr = server.server_address[1]
|
||||
|
@ -549,6 +550,7 @@ class NewIMAPSSLTests(NewIMAPTestsMixin, unittest.TestCase):
|
|||
imap_class = IMAP4_SSL
|
||||
server_class = SecureTCPServer
|
||||
|
||||
@requires_resource('walltime')
|
||||
def test_ssl_raises(self):
|
||||
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
|
||||
self.assertEqual(ssl_context.verify_mode, ssl.CERT_REQUIRED)
|
||||
|
@ -563,6 +565,7 @@ class NewIMAPSSLTests(NewIMAPTestsMixin, unittest.TestCase):
|
|||
ssl_context=ssl_context)
|
||||
client.shutdown()
|
||||
|
||||
@requires_resource('walltime')
|
||||
def test_ssl_verified(self):
|
||||
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
|
||||
ssl_context.load_verify_locations(CAFILE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue