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

Added: Improved tests using pytest parametrize #2543

Merged
merged 12 commits into from
Apr 14, 2022

Conversation

nmcguire101
Copy link
Contributor

@nmcguire101 nmcguire101 commented Apr 8, 2022

Related to #2522 (edited by @vfdev-5 to avoid closing the issue when this PR is merged)

Description:
Improved test tests\ignite\contrib\metrics\regression\test__base.py using pytest parametrize

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Apr 8, 2022

@nmcguire101 thanks for the PR, however I'm not sure if this change is an improvement. This test with asserts I think does not require any reparametrization. You can also see that your PR removes 14 lines and adds 19 lines.
Let's improve other tests.

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Thanks for the update @nmcguire101
Few naming nits and good to go, I think

tests/ignite/metrics/test_root_mean_squared_error.py Outdated Show resolved Hide resolved
tests/ignite/metrics/test_root_mean_squared_error.py Outdated Show resolved Hide resolved
tests/ignite/metrics/test_root_mean_squared_error.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Thanks @nmcguire101
LGTM

@vfdev-5 vfdev-5 enabled auto-merge (squash) April 14, 2022 19:45
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Apr 14, 2022

@nmcguire101 would you mind to apply similar ideas to other tests ?

@vfdev-5 vfdev-5 merged commit a0383ff into pytorch:master Apr 14, 2022
@nmcguire101 nmcguire101 deleted the nmcguire101 branch April 14, 2022 20:17
@nmcguire101
Copy link
Contributor Author

Yes, I will do that. Thank you for all your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants