Skip to content

Commit 83962ca

Browse files
author
Kartik Raj
committed
fix tests
1 parent 27ad4a8 commit 83962ca

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/client/pythonEnvironments/base/locators/lowLevel/windowsRegistryLocator.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export class WindowsRegistryLocator extends Locator<BasicEnvInfo> {
2828
): IPythonEnvsIterator<BasicEnvInfo> {
2929
const didUpdate = new EventEmitter<PythonEnvUpdatedEvent<BasicEnvInfo> | ProgressNotificationEvent>();
3030
const iterator = useWorkerThreads ? iterEnvsIterator(didUpdate) : oldIterEnvsIterator();
31-
iterator.onUpdated = didUpdate.event;
31+
if (useWorkerThreads) {
32+
iterator.onUpdated = didUpdate.event;
33+
}
3234
return iterator;
3335
}
3436
}

src/test/pythonEnvironments/base/locators/lowLevel/windowsRegistryLocator.unit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ suite('Windows Registry', () => {
222222
createBasicEnv(PythonEnvKind.OtherGlobal, path.join(regTestRoot, 'python38', 'python.exe')),
223223
].map((e) => ({ ...e, source: [PythonEnvSource.WindowsRegistry] }));
224224

225-
const iterator = locator.iterEnvs();
225+
const iterator = locator.iterEnvs(undefined, false);
226226
const actualEnvs = await getEnvs(iterator);
227227

228228
assertBasicEnvsEqual(actualEnvs, expectedEnvs);

0 commit comments

Comments
 (0)