GeezerVison is showing github.com — fixed test to resolve settings before comparing · millin/pythonVSCode@e2869f7
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/test/extension.common.configSettings.test.ts +6-1Lines changed: 6 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,6 +12,7 @@ import * as assert from 'assert'; |
12 | 12 | // as well as import your extension to test it |
13 | 13 | import * as vscode from 'vscode'; |
14 | 14 | import { PythonSettings } from '../client/common/configSettings'; |
| 15 | +import { SystemVariables } from '../client/common/systemVariables'; |
15 | 16 |
|
16 | 17 | const pythonSettings = PythonSettings.getInstance(); |
17 | 18 |
|
@@ -22,12 +23,16 @@ suite('Configuration Settings', () => { |
22 | 23 | }); |
23 | 24 | if (!IS_TRAVIS) { |
24 | 25 | test('Check Values', done => { |
| 26 | + const systemVariables: SystemVariables = new SystemVariables(); |
25 | 27 | const pythonConfig = vscode.workspace.getConfiguration('python'); |
26 | 28 | Object.keys(pythonSettings).forEach(key => { |
27 | | - const settingValue = pythonConfig.get(key, 'Not a config'); |
| 29 | + let settingValue = pythonConfig.get(key, 'Not a config'); |
28 | 30 | if (settingValue === 'Not a config') { |
29 | 31 | return; |
30 | 32 | } |
| 33 | + if (typeof settingValue === 'object' && settingValue !== null) { |
| 34 | + settingValue = systemVariables.resolve(settingValue); |
| 35 | + } |
31 | 36 | assert.deepEqual(settingValue, pythonSettings[key], `Setting ${key} not the same`); |
32 | 37 | }); |
33 | 38 |
|
|