From 1eb3033695a22e12463a92078984696e9519a76b Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Fri, 24 Feb 2023 15:29:17 -0800 Subject: [PATCH] Ensure cancellation is supported for conda env creation. --- .../creation/provider/condaCreationProvider.ts | 4 ++++ .../creation/provider/condaCreationProvider.unit.test.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/pythonEnvironments/creation/provider/condaCreationProvider.ts b/src/client/pythonEnvironments/creation/provider/condaCreationProvider.ts index 28046cbc73ad..5bf032f9f65f 100644 --- a/src/client/pythonEnvironments/creation/provider/condaCreationProvider.ts +++ b/src/client/pythonEnvironments/creation/provider/condaCreationProvider.ts @@ -192,6 +192,10 @@ async function createEnvironment(options?: CreateEnvironmentOptions): Promise { }); pickPythonVersionStub.resolves(undefined); - assert.isUndefined(await condaProvider.createEnvironment()); + await assert.isRejected(condaProvider.createEnvironment()); }); test('Create conda environment', async () => {