From e2869f7841df32d879cddd304c9ebaf1f93e09df Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 23 Nov 2016 19:18:48 +1100 Subject: [PATCH] fixed test to resolve settings before comparing --- src/test/extension.common.configSettings.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/extension.common.configSettings.test.ts b/src/test/extension.common.configSettings.test.ts index c309e1268b41..82ba49349bd7 100644 --- a/src/test/extension.common.configSettings.test.ts +++ b/src/test/extension.common.configSettings.test.ts @@ -12,6 +12,7 @@ import * as assert from 'assert'; // as well as import your extension to test it import * as vscode from 'vscode'; import { PythonSettings } from '../client/common/configSettings'; +import { SystemVariables } from '../client/common/systemVariables'; const pythonSettings = PythonSettings.getInstance(); @@ -22,12 +23,16 @@ suite('Configuration Settings', () => { }); if (!IS_TRAVIS) { test('Check Values', done => { + const systemVariables: SystemVariables = new SystemVariables(); const pythonConfig = vscode.workspace.getConfiguration('python'); Object.keys(pythonSettings).forEach(key => { - const settingValue = pythonConfig.get(key, 'Not a config'); + let settingValue = pythonConfig.get(key, 'Not a config'); if (settingValue === 'Not a config') { return; } + if (typeof settingValue === 'object' && settingValue !== null) { + settingValue = systemVariables.resolve(settingValue); + } assert.deepEqual(settingValue, pythonSettings[key], `Setting ${key} not the same`); });