ยปCore Development>Code coverage>Lib/test/ssltests.py

Python code coverage for Lib/test/ssltests.py

#countcontent
1n/a# Convenience test module to run all of the OpenSSL-related tests in the
2n/a# standard library.
3n/a
4n/aimport ssl
5n/aimport sys
6n/aimport subprocess
7n/a
8n/aTESTS = [
9n/a 'test_asyncio', 'test_ensurepip.py', 'test_ftplib', 'test_hashlib',
10n/a 'test_hmac', 'test_httplib', 'test_imaplib', 'test_nntplib',
11n/a 'test_poplib', 'test_ssl', 'test_smtplib', 'test_smtpnet',
12n/a 'test_urllib2_localnet', 'test_venv', 'test_xmlrpc'
13n/a]
14n/a
15n/adef run_regrtests(*extra_args):
16n/a print(ssl.OPENSSL_VERSION)
17n/a args = [
18n/a sys.executable,
19n/a '-Werror', '-bb', # turn warnings into exceptions
20n/a '-m', 'test',
21n/a ]
22n/a if not extra_args:
23n/a args.extend([
24n/a '-r', # randomize
25n/a '-w', # re-run failed tests with -v
26n/a '-u', 'network', # use network
27n/a '-u', 'urlfetch', # download test vectors
28n/a '-j', '0' # use multiple CPUs
29n/a ])
30n/a else:
31n/a args.extend(extra_args)
32n/a args.extend(TESTS)
33n/a result = subprocess.call(args)
34n/a sys.exit(result)
35n/a
36n/aif __name__ == '__main__':
37n/a run_regrtests(*sys.argv[1:])