Skip to content

Commit fe5459d

Browse files
committed
Fixed tests
1 parent 7a7995d commit fe5459d

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/test/application/diagnostics/checks/pythonInterpreter.unit.test.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ suite('Application Diagnostics - Checks Python Interpreter', () => {
108108
.returns(() => false)
109109
.verifiable(typemoq.Times.once());
110110
interpreterService
111-
.setup(i => i.getInterpreters(typemoq.It.isAny()))
112-
.returns(() => Promise.resolve([]))
111+
.setup(i => i.hasInterpreters)
112+
.returns(() => Promise.resolve(false))
113113
.verifiable(typemoq.Times.once());
114114

115115
const diagnostics = await diagnosticService.diagnose();
@@ -122,10 +122,14 @@ suite('Application Diagnostics - Checks Python Interpreter', () => {
122122
.setup(s => s.disableInstallationChecks)
123123
.returns(() => false)
124124
.verifiable(typemoq.Times.once());
125+
interpreterService
126+
.setup(i => i.hasInterpreters)
127+
.returns(() => Promise.resolve(true))
128+
.verifiable(typemoq.Times.once());
125129
interpreterService
126130
.setup(i => i.getInterpreters(typemoq.It.isAny()))
127131
.returns(() => Promise.resolve([{} as any]))
128-
.verifiable(typemoq.Times.once());
132+
.verifiable(typemoq.Times.never());
129133
interpreterService
130134
.setup(i => i.getActiveInterpreter(typemoq.It.isAny()))
131135
.returns(() => { return Promise.resolve({ type: InterpreterType.Unknown } as any); })
@@ -146,10 +150,14 @@ suite('Application Diagnostics - Checks Python Interpreter', () => {
146150
.setup(s => s.disableInstallationChecks)
147151
.returns(() => false)
148152
.verifiable(typemoq.Times.once());
153+
interpreterService
154+
.setup(i => i.hasInterpreters)
155+
.returns(() => Promise.resolve(true))
156+
.verifiable(typemoq.Times.once());
149157
interpreterService
150158
.setup(i => i.getInterpreters(typemoq.It.isAny()))
151159
.returns(() => Promise.resolve([{} as any]))
152-
.verifiable(typemoq.Times.once());
160+
.verifiable(typemoq.Times.never());
153161
interpreterService
154162
.setup(i => i.getActiveInterpreter(typemoq.It.isAny()))
155163
.returns(() => { return Promise.resolve({ type: InterpreterType.Unknown } as any); })

0 commit comments

Comments
 (0)