Skip to content

Added: Improved tests using pytest parametrize#2543

Merged
vfdev-5 merged 12 commits intopytorch:masterfrom
nmcguire101:nmcguire101
Apr 14, 2022
Merged

Added: Improved tests using pytest parametrize#2543
vfdev-5 merged 12 commits intopytorch:masterfrom
nmcguire101:nmcguire101

Conversation

@nmcguire101
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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