You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/07/12 18:37:20 UTC

[GitHub] [tvm] driazati commented on a diff in pull request #11974: [ci] Override `Request` in pytests

driazati commented on code in PR #11974:
URL: https://github.com/apache/tvm/pull/11974#discussion_r919290823


##########
conftest.py:
##########
@@ -96,3 +100,12 @@ def pytest_collection_modifyitems(config, items):
                 reason=f"Test running on shard {item_shard_index} of {num_shards}",
             )
         )
+
+
+def pytest_sessionstart():
+    if IS_IN_CI:
+        hook_script_dir = REPO_ROOT / "tests" / "scripts" / "request_hook"
+        sys.path.append(str(hook_script_dir))
+        import request_hook  # pylint: disable=import-outside-toplevel
+
+        request_hook.init()

Review Comment:
   the hook already logs a message any time its used + whenever it redirects a URL



-- 
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