Christian Heimes | c6d471d | 2013-12-05 07:45:36 +0100 | [diff] [blame] | 1 | # Convenience test module to run all of the SSL-related tests in the |
| 2 | # standard library. |
| 3 | |
| 4 | import sys |
| 5 | import subprocess |
| 6 | |
| 7 | TESTS = ['test_asyncio', 'test_ftplib', 'test_hashlib', 'test_httplib', |
Christian Heimes | db8f5c3 | 2013-12-05 07:53:38 +0100 | [diff] [blame] | 8 | 'test_imaplib', 'test_nntplib', 'test_poplib', 'test_smtplib', |
Christian Heimes | c6d471d | 2013-12-05 07:45:36 +0100 | [diff] [blame] | 9 | 'test_smtpnet', 'test_urllib2_localnet', 'test_venv'] |
| 10 | |
| 11 | def run_regrtests(*extra_args): |
| 12 | args = [sys.executable, "-m", "test"] |
| 13 | if not extra_args: |
| 14 | args.append("-unetwork") |
| 15 | else: |
| 16 | args.extend(extra_args) |
| 17 | args.extend(TESTS) |
| 18 | result = subprocess.call(args) |
| 19 | sys.exit(result) |
| 20 | |
| 21 | if __name__ == '__main__': |
| 22 | run_regrtests(*sys.argv[1:]) |