Skip tests or modules that require working sockets Can be used as a function/class decorator or to skip an entire module.
(*, module=False)
| 645 | ) |
| 646 | |
| 647 | def requires_working_socket(*, module=False): |
| 648 | """Skip tests or modules that require working sockets |
| 649 | |
| 650 | Can be used as a function/class decorator or to skip an entire module. |
| 651 | """ |
| 652 | msg = "requires socket support" |
| 653 | if module: |
| 654 | if not has_socket_support: |
| 655 | raise unittest.SkipTest(msg) |
| 656 | else: |
| 657 | return unittest.skipUnless(has_socket_support, msg) |
| 658 | |
| 659 | # Does strftime() support glibc extension like '%4Y'? |
| 660 | has_strftime_extensions = False |
no outgoing calls
no test coverage detected