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 some problems in the pytest adapter. #5648

Merged

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented May 16, 2019

(for #5458)

This is part of the effort to ensure that the pytest adapter can cope with unexpected circumstances (e.g. tests produced by third-party pytest plugins).

Note that this supercedes #5491.

  • 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!)
  • Appropriate comments and documentation strings in the code
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated
  • [ ] Test plan is updated as appropriate
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed)
  • [ ] The wiki is updated with any design decisions/details.

@ericsnowcurrently ericsnowcurrently force-pushed the pytest-adapter-cleanup branch from 4bfc859 to 0762284 Compare June 6, 2019 20:22
@ericsnowcurrently ericsnowcurrently added the no-changelog No news entry required label Jun 6, 2019
Copy link

@DonJayamanne DonJayamanne left a comment

Choose a reason for hiding this comment

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

Over all good, with few changes:

  • Please remove TODO or add issues for them.
  • When raising exceptions, please add messages so one doens't need to figure out why the exceptions were thrown.
  • Please document the JSON that's returned by this test adapter. This was requested in another PR but still not done. As a user of this code, I don't want to read multiple parts of the code to figure out what's being returned and the structure of the over all JSON (& possible values).

pythonFiles/testing_tools/adapter/pytest/_pytest_item.py Outdated Show resolved Hide resolved
pythonFiles/testing_tools/adapter/pytest/_pytest_item.py Outdated Show resolved Hide resolved
pythonFiles/testing_tools/adapter/pytest/_pytest_item.py Outdated Show resolved Hide resolved
@DonJayamanne
Copy link

Any reason for not addressing the following:

Please document the JSON that's returned by this test adapter. This was requested in another PR but still not done. As a user of this code, I don't want to read multiple parts of the code to figure out what's being returned and the structure of the over all JSON (& possible values).

traceback.print_stack()

msg = 'Unexpected pytest node (see printed output).'
exc = NotImplementedError(msg)

Choose a reason for hiding this comment

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

Do we really need to create a variable for this? Feels rather unnecessary.
Why not just inline this string?

Choose a reason for hiding this comment

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

No need to change.

@DonJayamanne DonJayamanne merged commit 6af799d into microsoft:master Jun 18, 2019
@ericsnowcurrently ericsnowcurrently deleted the pytest-adapter-cleanup branch June 20, 2019 13:23
@lock lock bot locked as resolved and limited conversation to collaborators Jul 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
no-changelog No news entry required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants