Repository navigation
Build the reflex-release test repository once per session - #7575
Open
quotentiroler wants to merge 1 commit into
Open
quotentiroler wants to merge 1 commit into
quotentiroler wants to merge 1 commit into
Conversation
The `repo` fixture created a fresh git repository for each of the ~480 reflex_release tests: `git remote get-url` (via towncrier_config_toml), `git init`, `git add -A` and `git commit`. A session-scoped `repo_template` fixture now builds that repository once and `repo` copies it into `tmp_path`, so each test still gets its own isolated repository with identical contents and history shape. Measured locally (Windows, Python 3.14): - fixture: 510 ms -> 73 ms per test - tests/units/reflex_release: 248.6 s -> 116.5 s, setup phase ~187 s -> 33 s On Linux (python:3.12 container) the fixture goes 27 ms -> 16 ms, about 5 s per suite run. The same 480 test ids are collected before and after and all pass.
Contributor
[Low impact] This test-only change appears safe to merge. SummaryBuilds the test repository once with session-scoped
Reviews (1) · Last reviewed commit: "Build the reflex-release test repository..." · Reviewed by Greptile |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Test-only performance change (needs the
skip-changeloglabel).The
repofixture intests/units/reflex_release/conftest.pycreated a fresh git repository for each of the 480 reflex_release tests:git remote get-url(viatowncrier_config_toml),git init,git add -Aandgit commit. A session-scopedrepo_templatefixture now builds that repository once, andrepocopies it intotmp_path, so each test still gets its own isolated repository with identical contents.Measured:
tests/units/reflex_release248.6 s to 116.5 s. The Windows unit-test jobs run this suite twice each.The same 480 test ids are collected before and after and all pass.