File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 11import logging
2+ import os
3+ import platform
24
35import logistro
46import pytest
7+ from hypothesis import HealthCheck , settings
58
69_logger = logistro .getLogger (__name__ )
710
11+ settings .register_profile (
12+ "ci" ,
13+ deadline = None , # no per-example deadline
14+ suppress_health_check = (HealthCheck .too_slow ,), # avoid flaky "too slow" on CI
15+ )
16+
817
918# pytest shuts down its capture before logging/threads finish
1019@pytest .fixture (scope = "session" , autouse = True )
@@ -19,3 +28,8 @@ def cleanup_logging_handlers(request):
1928 handler .flush ()
2029 if isinstance (handler , logging .StreamHandler ):
2130 logging .root .removeHandler (handler )
31+
32+
33+ is_ci = os .getenv ("GITHUB_ACTIONS" ) == "true" or os .getenv ("CI" ) == "true"
34+ if is_ci and platform .system in {"Windows" , "Darwin" }:
35+ settings .load_profile ("ci" )
You can’t perform that action at this time.
0 commit comments