(*args, **kwargs)
| 496 | """Skip the test on TLS certificate validation failures.""" |
| 497 | @functools.wraps(f) |
| 498 | def dec(*args, **kwargs): |
| 499 | try: |
| 500 | f(*args, **kwargs) |
| 501 | except OSError as e: |
| 502 | if "CERTIFICATE_VERIFY_FAILED" in str(e): |
| 503 | raise unittest.SkipTest("system does not contain " |
| 504 | "necessary certificates") |
| 505 | raise |
| 506 | return dec |
| 507 | |
| 508 | # A constant likely larger than the underlying OS pipe buffer size, to |