Fix PyPy pip downgrade install state

This commit is contained in:
dajiaohuang 2026-10-22 04:44:29 +08:00
parent ec52d0af72
commit e201669395
3 changed files with 13 additions and 5 deletions

View file

@ -380,7 +380,15 @@ describe('installPyPy', () => {
expect(spyDownloadTool).toHaveBeenCalled();
expect(spyExistsSync).toHaveBeenCalled();
expect(spyCacheDir).toHaveBeenCalled();
expect(spyExec).toHaveBeenCalled();
expect(spyExec).toHaveBeenCalledTimes(2);
expect(spyExec).toHaveBeenNthCalledWith(
1,
expect.stringMatching(/ -m ensurepip$/)
);
expect(spyExec).toHaveBeenNthCalledWith(
2,
expect.stringMatching(/ -m pip install --upgrade pip$/)
);
});
it('found and install PyPy, pre-release fallback', async () => {