Skip to content

Commit 9ed8ee6

Browse files
committed
Organize a bit conftest.py
1 parent 34cf8cf commit 9ed8ee6

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/py/tests/conftest.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,21 @@
88

99
_logger = logistro.getLogger(__name__)
1010

11+
# we turn off deadlines for macs and windows in CI
12+
# i'm under the impression that they are resource limited
13+
# and delays are often caused by sharing resources with other
14+
# virtualization neighbors.
15+
1116
settings.register_profile(
1217
"ci",
1318
deadline=None, # no per-example deadline
1419
suppress_health_check=(HealthCheck.too_slow,), # avoid flaky "too slow" on CI
1520
)
1621

22+
is_ci = os.getenv("GITHUB_ACTIONS") == "true" or os.getenv("CI") == "true"
23+
if is_ci and platform.system in {"Windows", "Darwin"}:
24+
settings.load_profile("ci")
25+
1726

1827
# pytest shuts down its capture before logging/threads finish
1928
@pytest.fixture(scope="session", autouse=True)
@@ -28,8 +37,3 @@ def cleanup_logging_handlers(request):
2837
handler.flush()
2938
if isinstance(handler, logging.StreamHandler):
3039
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")

0 commit comments

Comments
 (0)