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

Remove test specific code, ensure black supports paths relative to home #2780

Merged
merged 6 commits into from
Oct 9, 2018

Conversation

DonJayamanne
Copy link

For #2274
For #2678

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Has a news entry file (remember to thank yourself!)
  • Unit tests & system/integration tests are added/updated
  • [n/a] Any new/changed dependencies in package.json are pinned (e.g. "1.2.3", not "^1.2.3" for the specified version)
  • [n/a] package-lock.json has been regenerated by running npm install (if dependencies have changed)

Copy link

@d3r3kk d3r3kk left a comment

Choose a reason for hiding this comment

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

@ericsnowcurrently Check this out on how to make mocked classes more testable, I know I learned something.


// tslint:disable-next-line:max-func-body-length
suite('Python Settings', () => {
let config: TypeMoq.IMock<WorkspaceConfiguration>;
let expected: PythonSettings;
let settings: PythonSettings;
const CustomPythonSettings = class extends PythonSettings {
Copy link

Choose a reason for hiding this comment

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

Ok, I see how this works.

Mock out the members of the class you want to test when they are unnecessary for the test you are running.

@DonJayamanne DonJayamanne force-pushed the issue2274BlackPath branch 2 times, most recently from 4ec005d to 96da10e Compare October 9, 2018 20:42
@DonJayamanne DonJayamanne merged commit cb9fb90 into microsoft:master Oct 9, 2018
@DonJayamanne DonJayamanne deleted the issue2274BlackPath branch October 9, 2018 22:47
@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.

2 participants