Skip to content

Commit 331c9f1

Browse files
committed
test fixes
1 parent 00ed716 commit 331c9f1

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/test/unittest/common/python.unit.test.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,10 @@ suite('Python API Tests', () => {
248248
const result = await pythonApi.resolveEnvironment(envPath);
249249
expect(result).to.not.be.undefined;
250250
// PythonEnvironment generated by legacyResolveEnvironment -> converted shape
251-
expect((result as any).execInfo?.run?.executable).to.equal(envPath);
252-
expect((result as any).environmentPath?.fsPath).to.equal(envPath);
253-
expect((result as any).displayPath).to.equal(envPath);
251+
const expectedPath = Uri.file(envPath).fsPath;
252+
expect((result as any).execInfo?.run?.executable).to.equal(expectedPath);
253+
expect((result as any).environmentPath?.fsPath).to.equal(expectedPath);
254+
expect((result as any).displayPath).to.equal(expectedPath);
254255
expect((result as any).version).to.equal('Unknown');
255256
});
256257

@@ -267,9 +268,10 @@ suite('Python API Tests', () => {
267268

268269
const result = await pythonApi.resolveEnvironment(env);
269270
expect(result).to.not.be.undefined;
270-
expect((result as any).execInfo?.run?.executable).to.equal('/usr/bin/python3');
271-
expect((result as any).environmentPath?.fsPath).to.equal('/usr/bin/python3');
272-
expect((result as any).displayPath).to.equal('/usr/bin/python3');
271+
const expectedPath = Uri.file('/usr/bin/python3').fsPath;
272+
expect((result as any).execInfo?.run?.executable).to.equal(expectedPath);
273+
expect((result as any).environmentPath?.fsPath).to.equal(expectedPath);
274+
expect((result as any).displayPath).to.equal(expectedPath);
273275
});
274276

275277
test('Should return undefined for invalid environment', async () => {

0 commit comments

Comments
 (0)