You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "kparzysz-quic (via GitHub)" <gi...@apache.org> on 2023/04/03 20:50:07 UTC

[GitHub] [tvm] kparzysz-quic opened a new pull request, #14475: [pytest] Don't return values from test_* functions

kparzysz-quic opened a new pull request, #14475:
URL: https://github.com/apache/tvm/pull/14475

   Pytest expects test functions to return None, and errors to be flagged via exceptions. It actually emits warnings for "return" statements encountered in test_ functions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] kparzysz-quic merged pull request #14475: [pytest] Don't return values from test_* functions

Posted by "kparzysz-quic (via GitHub)" <gi...@apache.org>.
kparzysz-quic merged PR #14475:
URL: https://github.com/apache/tvm/pull/14475


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] Lunderberg commented on a diff in pull request #14475: [pytest] Don't return values from test_* functions

Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on code in PR #14475:
URL: https://github.com/apache/tvm/pull/14475#discussion_r1157421670


##########
tests/python/contrib/test_hexagon/test_maxpool2d_blocked.py:
##########
@@ -151,7 +151,7 @@ def test_maxpool(self, shape_nhwc, window_size, stride, pad, dtype, target):
             padding=(pad, pad, pad, pad),
             dtype=dtype,
         )
-        return output, ref_output
+        assert all([output is not None, ref_output is not None])

Review Comment:
   If the assert is causing spurious unit test failures, it can be removed.  The test is to ensure that no exceptions are through while lowering/building, and no further assert is required.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] Lunderberg commented on a diff in pull request #14475: [pytest] Don't return values from test_* functions

Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on code in PR #14475:
URL: https://github.com/apache/tvm/pull/14475#discussion_r1157427148


##########
tests/python/contrib/test_hexagon/test_maxpool2d_blocked.py:
##########
@@ -151,7 +151,7 @@ def test_maxpool(self, shape_nhwc, window_size, stride, pad, dtype, target):
             padding=(pad, pad, pad, pad),
             dtype=dtype,
         )
-        return output, ref_output
+        assert all([output is not None, ref_output is not None])

Review Comment:
   Ah, got it.  So long as the `build_and_run` function is called in the test, the return value should be ignoreable here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] kparzysz-quic commented on a diff in pull request #14475: [pytest] Don't return values from test_* functions

Posted by "kparzysz-quic (via GitHub)" <gi...@apache.org>.
kparzysz-quic commented on code in PR #14475:
URL: https://github.com/apache/tvm/pull/14475#discussion_r1157425114


##########
tests/python/contrib/test_hexagon/test_maxpool2d_blocked.py:
##########
@@ -151,7 +151,7 @@ def test_maxpool(self, shape_nhwc, window_size, stride, pad, dtype, target):
             padding=(pad, pad, pad, pad),
             dtype=dtype,
         )
-        return output, ref_output
+        assert all([output is not None, ref_output is not None])

Review Comment:
   I did remove it at first, but then the linter complained that `output` and `ref_output` were unused values...  :|



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tvm-bot commented on pull request #14475: [pytest] Don't return values from test_* functions

Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #14475:
URL: https://github.com/apache/tvm/pull/14475#issuecomment-1494962733

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * No users to tag found in teams: `pytest` <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org