Skip to content

Commit 2a4a9d7

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6c6f5d9 commit 2a4a9d7

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

CHANGES/11992.contrib.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ Fixed flaky import time test for Python 3.12+ -- by :user:`rodrigobnogueira`.
22

33
Refactored to use version comparison instead of explicit version list,
44
making the test future-proof for new Python releases.
5-

tests/test_imports.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ def test_web___all__(pytester: pytest.Pytester) -> None:
3535
# 3.12+ is expected to be a bit slower due to performance trade-offs,
3636
# and even slower under pytest-xdist, especially in CI
3737
_RELAXED_IMPORT_TIME_THRESHOLD = (
38-
_XDIST_WORKER_COUNT * 100 * (1.53 if _IS_CI_ENV else 1)
39-
if _IS_XDIST_RUN
40-
else 350
38+
_XDIST_WORKER_COUNT * 100 * (1.53 if _IS_CI_ENV else 1) if _IS_XDIST_RUN else 350
4139
)
4240
_DEFAULT_IMPORT_TIME_THRESHOLD = 200
4341

@@ -83,4 +81,3 @@ def test_import_time(pytester: pytest.Pytester) -> None:
8381

8482
expected_time = _get_import_time_threshold()
8583
assert best_time_ms < expected_time
86-

0 commit comments

Comments
 (0)