Skip to content

Commit 6c1dbf6

Browse files
[cherry-pick] release: Prevent virtualenv redirect from occupying .venv
1 parent 70f695e commit 6c1dbf6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/client/pythonEnvironments/base/locators/common/nativePythonFinder.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ class NativePythonFinderImpl extends DisposableBase implements NativePythonFinde
120120
? getGlobalStorage<boolean>(this.context, DONT_SHOW_SPAWN_ERROR_AGAIN, false)
121121
: ({ get: () => false, set: async () => {} } as IPersistentStorage<boolean>);
122122
this.connection = this.start();
123-
void this.configure();
124123
this.firstRefreshResults = this.refreshFirstTime();
125124
}
126125

‎src/test/pythonEnvironments/nativePythonFinder.unit.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ suite('Native Python Finder', () => {
2121
let getConfigurationStub: sinon.SinonStub;
2222
let configMock: typemoq.IMock<WorkspaceConfiguration>;
2323
let getWorkspaceFolderPathsStub: sinon.SinonStub;
24+
const locatorOutput = new MockOutputChannel('locator');
2425

2526
setup(() => {
2627
createLogOutputChannelStub = sinon.stub(windowsApis, 'createLogOutputChannel');
27-
createLogOutputChannelStub.returns(new MockOutputChannel('locator'));
28+
createLogOutputChannelStub.returns(locatorOutput);
2829

2930
getWorkspaceFolderPathsStub = sinon.stub(workspaceApis, 'getWorkspaceFolderPaths');
3031
getWorkspaceFolderPathsStub.returns([]);
@@ -55,7 +56,7 @@ suite('Native Python Finder', () => {
5556
}
5657

5758
// typically all test envs should have at least one environment
58-
assert.isNotEmpty(envs);
59+
assert.isNotEmpty(envs, `Python Locator output:\n${locatorOutput.output || '(none)'}`);
5960
});
6061

6162
test('Resolve should return python environments with version', async () => {

0 commit comments

Comments
 (0)