Add inline-script environment creation tests (PEP 723 PR 5/16 - tests)#1654
Closed
StellaHuang95 wants to merge 2 commits into
Closed
Add inline-script environment creation tests (PEP 723 PR 5/16 - tests)#1654StellaHuang95 wants to merge 2 commits into
StellaHuang95 wants to merge 2 commits into
Conversation
Create and reuse dependency-keyed virtual environments for inline scripts, with compatible interpreter selection, cache ownership validation, cross-process locking, and cancellation-safe creation. Tests for this change are split into a companion PR to keep the diff reviewable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 39dcc6a3-0fbd-4f36-9d0f-68677de49c27
Unit tests for the inline-script environment creation path: cache key, cache layout, interpreter selection, cross-process lockfile, venv python path, process cancellation, createWithProgress options, and the InlineScriptEnvManager create/reuse flow. Based on the implementation branch so this PR shows only the test changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 39dcc6a3-0fbd-4f36-9d0f-68677de49c27
This was referenced Jul 23, 2026
Contributor
Author
|
Superseded by a finer 3-way split. Rather than an implementation/tests split, PR 5 is now divided by dependency layer, each PR carrying its own tests:
Each is independently green (compile-tests clean, 0 failing). Merge order 5a -> 5b -> 5c; applied together they are byte-for-byte identical to the original change. Closing this PR. |
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.
Split for review
Reviewers asked to reduce the size of #1651. That PR now carries only the implementation; this PR carries the unit tests for the inline-script environment creation path.
This PR is stacked on #1651. Its branch is based on the #1651 branch, so the diff below currently also includes the implementation commit. To review just the tests, open the
Add PEP 723 inline script environment creation testscommit (9 test files). Once #1651 merges tomain, this PR reduces to tests only with no rebase needed.Applied together, the two PRs are byte-for-byte identical to the original single change.
What this PR adds
New suites:
lockfile.apis.unit.test.ts— 9 tests: contention, retain/fail-fast, orphaned and compromised locks, and timeout.venvUtils.createWithProgress.unit.test.ts— 3 tests fortrackUvEnvironmentandpkgInstallationCancelled.helpers.cancellation.unit.test.ts— 4 tests forrunProcesscancellation safety.virtualEnvironment.unit.test.ts— 2 tests forgetVenvPythonPathon Windows and POSIX.Expanded / updated suites:
inlineScriptEnvManager.unit.test.ts— 40 tests across scope/metadata validation, base-interpreter selection, cache creation, cache reuse, transaction rollback, and events/disposal.inlineScriptCacheLayout.unit.test.ts,inlineScriptCacheKey.unit.test.ts,inlineScriptInterpreter.unit.test.ts— cover the new/changed layout, cache-key, and interpreter-selection helpers.inlineScriptMain.unit.test.ts— updated for the newregisterInlineScriptFeaturessignature.With both PRs applied,
npm run unittestreports 1487 passing, 0 failing, 5 pending.Merge order
Merge #1651 first, then this PR.