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

Changing all the raw asserts to self.assert in tests #1483

Closed
surgan12 opened this issue Oct 17, 2019 · 5 comments
Closed

Changing all the raw asserts to self.assert in tests #1483

surgan12 opened this issue Oct 17, 2019 · 5 comments

Comments

@surgan12
Copy link
Contributor

As pointed out by @fmassa here in #1465. We could switch the existing asserts to the self.assert version of it.

This could be a simple first issue for people to start with.

@fmassa
Copy link
Member

fmassa commented Oct 17, 2019

I would recommend sending small-sized PRs, changing a single file / a few hundred lines at a time, to make reviewing easier.

@ekagra-ranjan
Copy link
Contributor

@PyExtreme this could also be a good starting point for you :)

frgfm added a commit to frgfm/vision that referenced this issue Oct 17, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See pytorch#1483
@PyExtreme
Copy link
Contributor

Hi @ekagra-ranjan , this issue has already been picked. Thanks for letting me about it. I have started working on #1375 and that also looks very interesting.

Thank you

frgfm added a commit to frgfm/vision that referenced this issue Oct 17, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See pytorch#1483
fmassa pushed a commit that referenced this issue Oct 18, 2019
* test: Updated assert in test_transforms

Updated all raw asserts to corresponding unittest.TestCase.assert. See #1483

* test: Fixed linter on test_transforms
frgfm added a commit to frgfm/vision that referenced this issue Oct 18, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See pytorch#1483
frgfm added a commit to frgfm/vision that referenced this issue Oct 18, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See pytorch#1483
frgfm added a commit to frgfm/vision that referenced this issue Oct 18, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See pytorch#1483
frgfm added a commit to frgfm/vision that referenced this issue Oct 18, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See pytorch#1483
frgfm added a commit to frgfm/vision that referenced this issue Oct 18, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See pytorch#1483
frgfm added a commit to frgfm/vision that referenced this issue Oct 18, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See pytorch#1483
frgfm added a commit to frgfm/vision that referenced this issue Oct 18, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See pytorch#1483
@frgfm
Copy link
Contributor

frgfm commented Oct 18, 2019

The last PRs should cover all the remaining bare assert in the tests!

fmassa pushed a commit that referenced this issue Oct 18, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See #1483
fmassa pushed a commit that referenced this issue Oct 18, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See #1483
fmassa pushed a commit that referenced this issue Oct 18, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See #1483
fmassa pushed a commit that referenced this issue Oct 21, 2019
Updated all raw asserts to corresponding unittest.TestCase.assert. See #1483
fmassa pushed a commit that referenced this issue Oct 21, 2019
* test: Updated asserts in test_io

Updated all raw asserts to corresponding unittest.TestCase.assert. See #1483

* test: Fixed test_io

In order to use unittest.TestCase for asserts in temp_video, the object has to be passed itself to temp_video.

* test: Updated asserts to AssertionError

Switched initial raw assert to AssertionError.

* test: Changed AssertionError for ValueError
fmassa pushed a commit that referenced this issue Oct 22, 2019
* test: Updated asserts in test_onnx

Updated all raw asserts to corresponding unittest.TestCase.assert. See #1483

* test: Refactored AssertionError

Opted for cleaner raise to avoid error type casting and string conversion
fmassa pushed a commit that referenced this issue Oct 25, 2019
* test: Updated asserts in test_utils

Updated all raw asserts to corresponding unittest.TestCase.assert. See #1483

* style: Fixed lint check
@fmassa
Copy link
Member

fmassa commented Oct 25, 2019

Fixed by @frgfm , thanks a lot!

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

No branches or pull requests

5 participants