(err: Exception)
| 149 | """Helps you skip tests that require the network""" |
| 150 | |
| 151 | def _is_unreachable_err(err: Exception) -> bool: |
| 152 | return getattr(err, "errno", None) in ( |
| 153 | errno.ENETUNREACH, |
| 154 | errno.EHOSTUNREACH, # For OSX |
| 155 | ) |
| 156 | |
| 157 | def _has_route() -> bool: |
| 158 | try: |