Skip to content

Conversation

DevPranjal
Copy link
Contributor

Refactor test_transforms_video.py to pytest as mentioned in #4033

msg = "height: " + str(height) + " width: " \
+ str(width) + " oheight: " + str(oheight) + " owidth: " + str(owidth)
self.assertEqual(sum1.item() > 1, True, msg)
assert sum1.item() > 1 == True, msg
Copy link
Contributor Author

@DevPranjal DevPranjal Jun 10, 2021

Choose a reason for hiding this comment

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

flake test here suggests:

./test/test_transforms_video.py:85:32: E712 comparison to True should be 'if cond is True:' or 'if cond:'

Do I need to change or stick with the original implementation?

Copy link
Member

Choose a reason for hiding this comment

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

Yes we should just use assert sum1.item() > 1, msg :)

@DevPranjal DevPranjal force-pushed the refactor-test_transforms_video branch from 8ed0529 to 5006659 Compare June 11, 2021 02:44
@NicolasHug
Copy link
Member

Thanks @DevPranjal !!

@NicolasHug NicolasHug mentioned this pull request Jun 11, 2021
8 tasks
@DevPranjal
Copy link
Contributor Author

Thanks for the fix.

facebook-github-bot pushed a commit that referenced this pull request Jun 14, 2021
Reviewed By: fmassa

Differential Revision: D29097720

fbshipit-source-id: fe2afb61e2a5ea23f467793dd33f545435d4db26
@DevPranjal DevPranjal deleted the refactor-test_transforms_video branch August 7, 2021 01:58
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