lhutton1 commented on a change in pull request #10518:
URL: https://github.com/apache/tvm/pull/10518#discussion_r821641635
##########
File path: tests/python/relay/aot/aot_test_utils.py
##########
@@ -731,130 +733,129 @@ def run_and_check(
This method uses the original test data and compiled runtime.Modules
to run in the test runner to verify the results.
"""
+ tmpdir = tempfile.TemporaryDirectory() if test_dir is None else
contextlib.surpress()
Review comment:
Yeah this was an attempt to make the `with` statement conditional, but
without limiting us to Python 3.7 (in which case `nullcontext` could have been
used), see https://stackoverflow.com/a/45187287. I agree it looks a bit
strange, I was trying to avoid wrapping the body in another function. In
hindsight it probably would be more readable to do that (wrap the body in a
function) though. Thanks!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]