Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 55b196a

Browse files
committed
Make Lib/test/ssltests.py more useful and faster for OpenSSL testing
1 parent 463ef2b commit 55b196a

1 file changed

Lines changed: 21 additions & 6 deletions

File tree

Lib/test/ssltests.py

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
1-
# Convenience test module to run all of the SSL-related tests in the
1+
# Convenience test module to run all of the OpenSSL-related tests in the
22
# standard library.
33

4+
import ssl
45
import sys
56
import subprocess
67

7-
TESTS = ['test_asyncio', 'test_ftplib', 'test_hashlib', 'test_httplib',
8-
'test_imaplib', 'test_nntplib', 'test_poplib', 'test_smtplib',
9-
'test_smtpnet', 'test_urllib2_localnet', 'test_venv']
8+
TESTS = [
9+
'test_asyncio', 'test_ensurepip.py', 'test_ftplib', 'test_hashlib',
10+
'test_hmac', 'test_httplib', 'test_imaplib', 'test_nntplib',
11+
'test_poplib', 'test_ssl', 'test_smtplib', 'test_smtpnet',
12+
'test_urllib2_localnet', 'test_venv', 'test_xmlrpc'
13+
]
1014

1115
def run_regrtests(*extra_args):
12-
args = [sys.executable, "-m", "test"]
16+
print(ssl.OPENSSL_VERSION)
17+
args = [
18+
sys.executable,
19+
'-Werror', '-bb', # turn warnings into exceptions
20+
'-m', 'test',
21+
]
1322
if not extra_args:
14-
args.append("-unetwork")
23+
args.extend([
24+
'-r', # randomize
25+
'-w', # re-run failed tests with -v
26+
'-u', 'network', # use network
27+
'-u', 'urlfetch', # download test vectors
28+
'-j', '0' # use multiple CPUs
29+
])
1530
else:
1631
args.extend(extra_args)
1732
args.extend(TESTS)

0 commit comments

Comments
 (0)