Add a script similar to xmltests.py to run all SSL-related unit tests

This commit is contained in:
Christian Heimes 2013-12-05 07:45:36 +01:00
parent 8e7f394282
commit c6d471d653
1 changed files with 22 additions and 0 deletions

22
Lib/test/ssltests.py Executable file
View File

@ -0,0 +1,22 @@
# Convenience test module to run all of the SSL-related tests in the
# standard library.
import sys
import subprocess
TESTS = ['test_asyncio', 'test_ftplib', 'test_hashlib', 'test_httplib',
'test_imaplib', 'test_nntplib', 'test_poplib', 'test_smtplib',
'test_smtpnet', 'test_urllib2_localnet', 'test_venv']
def run_regrtests(*extra_args):
args = [sys.executable, "-m", "test"]
if not extra_args:
args.append("-unetwork")
else:
args.extend(extra_args)
args.extend(TESTS)
result = subprocess.call(args)
sys.exit(result)
if __name__ == '__main__':
run_regrtests(*sys.argv[1:])