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

port pad, resized_crop and affine in test_functional_tensor to pytest #3974

Merged
merged 3 commits into from
Jun 6, 2021

Conversation

saswatpp
Copy link
Contributor

@saswatpp saswatpp commented Jun 5, 2021

Refactored the following tests to pytest in the file test/test/functional_tensor.py mentioned in the issue #3956

Group B2 :

  • test_pad -- parametrized device,dt,pad,config
  • test_resized_crop -parametrized device, mode

Group C :

  • Organized the affine tests under a single class TestAffine
  • Split the methods for each test
  • Had a separate function for testing on batches test_batches
  • Had a separate function for testing warnings test_warnings

@NicolasHug, this one was definitely tricky as you mentioned and I hope the above design makes sense :)

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks a lot @saswatpp , excellent work on test_affine! You made a lot of sensible choices. I made a few minor comments but this looks great already

test/test_functional_tensor.py Outdated Show resolved Hide resolved
test/test_functional_tensor.py Outdated Show resolved Hide resolved
test/test_functional_tensor.py Outdated Show resolved Hide resolved
test/test_functional_tensor.py Show resolved Hide resolved
test/test_functional_tensor.py Outdated Show resolved Hide resolved
Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

N.I.C.E
Thanks a lot @saswatpp !

@NicolasHug NicolasHug merged commit a2329ff into pytorch:master Jun 6, 2021
facebook-github-bot pushed a commit that referenced this pull request Jun 10, 2021
…nsor to pytest (#3974)

Reviewed By: NicolasHug

Differential Revision: D29027355

fbshipit-source-id: fb8f8d30b2fcb99c028073b8d26e9975369403e0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants