Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix showStartPage setting on configSettings.ts #13706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/2 Fixes/13706.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the behavior of the 'python.showStartPage' setting.
5 changes: 5 additions & 0 deletions src/client/common/configSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,11 @@ export class PythonSettings implements IPythonSettings {
this.datascience = dataScienceSettings;
}

const showStartPage = pythonSettings.get<boolean>('showStartPage');
if (showStartPage !== undefined) {
this.showStartPage = showStartPage;
}

this.insidersChannel = pythonSettings.get<ExtensionChannels>('insidersChannel')!;
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/common/configSettings/configSettings.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ suite('Python Settings', async () => {
let settings: CustomPythonSettings;
setup(() => {
sinon.stub(EnvFileTelemetry, 'sendSettingTelemetry').returns();
config = TypeMoq.Mock.ofType<WorkspaceConfiguration>(undefined, TypeMoq.MockBehavior.Strict);
config = TypeMoq.Mock.ofType<WorkspaceConfiguration>(undefined, TypeMoq.MockBehavior.Loose);
Copy link
Author

@DavidKutu DavidKutu Sep 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bunch of tests failed because of this mock. But I don't know if this is wrong. @karthiknadig can you take a quick look?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only see the Mac failure which is not related to this change.

expected = new CustomPythonSettings(undefined, new MockAutoSelectionService());
settings = new CustomPythonSettings(undefined, new MockAutoSelectionService());
expected.defaultInterpreterPath = 'python';
Expand Down