Get the global timeout setting for async tests. Returns a float, the timeout in seconds. .. versionadded:: 3.1
()
| 69 | |
| 70 | |
| 71 | def get_async_test_timeout() -> float: |
| 72 | """Get the global timeout setting for async tests. |
| 73 | |
| 74 | Returns a float, the timeout in seconds. |
| 75 | |
| 76 | .. versionadded:: 3.1 |
| 77 | """ |
| 78 | env = os.environ.get("ASYNC_TEST_TIMEOUT") |
| 79 | if env is not None: |
| 80 | try: |
| 81 | return float(env) |
| 82 | except ValueError: |
| 83 | pass |
| 84 | return 5 |
| 85 | |
| 86 | |
| 87 | class AsyncTestCase(unittest.TestCase): |