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


##########
tests/python/ci/test_tvmbot.py:
##########
@@ -37,167 +36,262 @@
 """.strip()
 
 
-TEST_DATA = {
-    "successful-merge": {
-        "number": 10786,
-        "filename": "pr10786-merges.json",
-        "expected": SUCCESS_EXPECTED_OUTPUT,
-        "comment": "@tvm-bot merge",
-        "user": "abc",
-        "detail": "Everything is fine so this PR will merge",
-    },
-    "no-request": {
-        "number": 10786,
-        "filename": "pr10786-nottriggered.json",
-        "expected": "Command 'do something else' did not match anything",
-        "comment": "@tvm-bot do something else",
-        "user": "abc",
-        "detail": "A PR for which the mergebot runs but no merge is requested",
-    },
-    "bad-ci": {
-        "number": 10786,
-        "filename": "pr10786-badci.json",
-        "expected": "Cannot merge, these CI jobs are not successful on",
-        "comment": "@tvm-bot merge",
-        "user": "abc",
-        "detail": "A PR which failed CI and cannot merge",
-    },
-    "old-review": {
-        "number": 10786,
-        "filename": "pr10786-oldreview.json",
-        "expected": "Cannot merge, did not find any approving reviews",
-        "comment": "@tvm-bot merge",
-        "user": "abc",
-        "detail": "A PR with passing CI and approving reviews on an old commit 
so it cannot merge",
-    },
-    "missing-job": {
-        "number": 10786,
-        "filename": "pr10786-missing-job.json",
-        "expected": "Cannot merge, missing expected jobs",
-        "comment": "@tvm-bot merge",
-        "user": "abc",
-        "detail": "PR missing an expected CI job and cannot merge",
-    },
-    "invalid-author": {
-        "number": 10786,
-        "filename": "pr10786-invalid-author.json",
-        "expected": "Failed auth check 'collaborators', quitting",
-        "comment": "@tvm-bot merge",
-        "user": "not-abc",
-        "detail": "Merge requester is not a committer and cannot merge",
-    },
-    "unauthorized-comment": {
-        "number": 11244,
-        "filename": "pr11244-unauthorized-comment.json",
-        "expected": "Failed auth check 'collaborators'",
-        "comment": "@tvm-bot merge",
-        "user": "not-abc2",
-        "detail": "Check that a merge comment not from a CONTRIBUTOR is 
rejected",
-    },
-    "no-review": {
-        "number": 11267,
-        "filename": "pr11267-no-review.json",
-        "expected": "Cannot merge, did not find any approving reviews from 
users with write access",
-        "comment": "@tvm-bot merge",
-        "user": "abc",
-        "detail": "Check that a merge request without any reviews is rejected",
-    },
-    "changes-requested": {
-        "number": 10786,
-        "filename": "pr10786-changes-requested.json",
-        "expected": "Cannot merge, found [this review]",
-        "comment": "@tvm-bot merge",
-        "user": "abc",
-        "detail": "Check that a merge request with a 'Changes Requested' 
review is rejected",
-    },
-    "co-authors": {
-        "number": 10786,
-        "filename": "pr10786-co-authors.json",
-        "expected": "Co-authored-by: Some One <[email protected]>",
-        "comment": "@tvm-bot merge",
-        "user": "abc",
-        "detail": "Check that a merge request with co-authors generates the 
correct commit message",
-    },
-    "rerun-ci": {
-        "number": 11442,
-        "filename": "pr11442-rerun-ci.json",
-        "expected": "Rerunning ci with",
-        "comment": "@tvm-bot rerun",
-        "user": "abc",
-        "detail": "Start a new CI job",
-    },
-    "ignore-jobs": {
-        "number": 10786,
-        "filename": "pr10786-ignore-jobs.json",
-        "expected": "Dry run, would have merged",
-        "comment": "@tvm-bot merge",
-        "user": "abc",
-        "detail": "Ignore GitHub Actions jobs that don't start with CI / ",
-    },
-}
+class _TvmBotTest:

Review Comment:
   its not totally abstract since the standard `load_data` actually does 
something, I went ahead and deleted the no-op implementations in the subclasses



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

Reply via email to