Skip to content
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

Fix getting display name and version when using windows registry #1697

Merged
merged 7 commits into from
May 21, 2018

Conversation

DonJayamanne
Copy link

@DonJayamanne DonJayamanne commented May 16, 2018

Fixes #1660
Fixes #1703

This pull request:

  • Has a title summarizes what is changing
  • Has news entry file

@DonJayamanne DonJayamanne changed the title Fix getting display name and version when using windows registry WIP - Fix getting display name and version when using windows registry May 16, 2018
@codecov
Copy link

codecov bot commented May 16, 2018

Codecov Report

Merging #1697 into master will increase coverage by 0.46%.
The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1697      +/-   ##
==========================================
+ Coverage   71.49%   71.96%   +0.46%     
==========================================
  Files         277      277              
  Lines       13014    13023       +9     
  Branches     2344     2344              
==========================================
+ Hits         9305     9372      +67     
+ Misses       3574     3515      -59     
- Partials      135      136       +1
Impacted Files Coverage Δ
src/client/common/types.ts 100% <ø> (ø) ⬆️
...preter/locators/services/windowsRegistryService.ts 93.58% <100%> (+74.1%) ⬆️
src/client/common/platform/pathUtils.ts 80% <50%> (-20%) ⬇️
...ttests/common/managers/testConfigurationManager.ts 32.69% <53.84%> (+22.05%) ⬆️
src/client/common/logger.ts 33.33% <0%> (-20%) ⬇️
src/client/linters/pydocstyle.ts 90.47% <0%> (-4.77%) ⬇️
src/client/linters/baseLinter.ts 88.42% <0%> (-2.11%) ⬇️
...rc/client/debugger/PythonProcessCallbackHandler.ts 53.61% <0%> (-0.66%) ⬇️
src/client/debugger/mainV2.ts 77.82% <0%> (+2.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e26da1a...6f83b0e. Read the comment docs.

@DonJayamanne DonJayamanne changed the title WIP - Fix getting display name and version when using windows registry Fix getting display name and version when using windows registry May 16, 2018
public getPathVariableName() {
return this.isWindows ? WINDOWS_PATH_VARIABLE_NAME : NON_WINDOWS_PATH_VARIABLE_NAME;
}
public basename(pathValue: string, ext?: string): string{
Copy link

@MikhailArkhipov MikhailArkhipov May 18, 2018

Choose a reason for hiding this comment

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

Typically it is not necessary to wrap over Path since behavior does not change across systems and it does not operate over 'real' things like actual files. We prob never going to mock it. So why not use path directly? We could eventually move getPathVariableName to IPlatform and drop this service althogether.

Copy link
Author

Choose a reason for hiding this comment

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

I did want to mock this for one of the tests. I was relying on the tests to run on AppVeyor.
Mocking this makes it possible to run the tests on Travis as well, and not have to rely just on AppVeyor to run tests.

Choose a reason for hiding this comment

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

Hm OK. Is behavior of basename is different across OS? Or did you mean path variable casing?

Copy link
Author

@DonJayamanne DonJayamanne May 20, 2018

Choose a reason for hiding this comment

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

Basename is different across OS, as path separator is different, it is either / or \

@DonJayamanne DonJayamanne merged commit 35fe3c0 into microsoft:master May 21, 2018
@DonJayamanne DonJayamanne deleted the issue1660FixAppVeyorTests branch June 20, 2018 03:13
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run unit tests as a githook Interpreter unit tests are failing on AppVeyor
2 participants