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

test: Updated asserts in test_video_reader #1500

Closed
wants to merge 4 commits into from

Conversation

frgfm
Copy link
Contributor

@frgfm frgfm commented Oct 18, 2019

This PR updates all raw assert to the corresponding unittest.TestCase assert method for tests related to torch.ops.video_reader as suggested by #1483.
The specific test was run locally with success, any feedback is welcome!

frgfm added 4 commits October 18, 2019 12:23
Updated all raw asserts to corresponding unittest.TestCase.assert. See pytorch#1483
Moved _get_video_tensor to TestVideoReader method to leverage unittest.TestCase methods.
Switched initial raw assert to FileNotFoundError.
@codecov-io
Copy link

Codecov Report

Merging #1500 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1500      +/-   ##
==========================================
+ Coverage   64.46%   64.49%   +0.03%     
==========================================
  Files          83       83              
  Lines        6421     6428       +7     
  Branches      982      984       +2     
==========================================
+ Hits         4139     4146       +7     
  Misses       1992     1992              
  Partials      290      290
Impacted Files Coverage Δ
torchvision/transforms/functional_tensor.py 57.14% <0%> (-2.86%) ⬇️
torchvision/models/detection/transform.py 66.92% <0%> (ø) ⬆️
torchvision/models/detection/roi_heads.py 56.14% <0%> (+0.37%) ⬆️
torchvision/ops/boxes.py 100% <0%> (+5.55%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6101f2d...2b248c4. Read the comment docs.

Copy link
Member

@fmassa fmassa 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 PR, but FileNotFoundError is not Python2-compatible, and I think it's not worth the trouble trying to backport it for replacing this assert here.

@fmassa fmassa closed this Oct 22, 2019
@frgfm frgfm deleted the test-videoreader-assert branch October 22, 2019 09:41
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.

3 participants