Test that a comment with a link to the docs is successfully left on PRs
(target_url, base_url, commit_sha, expected_body)
| 332 | ) |
| 333 | ) |
| 334 | def test_docs_comment(target_url, base_url, commit_sha, expected_body): |
| 335 | """ |
| 336 | Test that a comment with a link to the docs is successfully left on PRs |
| 337 | """ |
| 338 | pr_data = { |
| 339 | "commits": { |
| 340 | "nodes": [ |
| 341 | { |
| 342 | "commit": { |
| 343 | "oid": commit_sha, |
| 344 | "statusCheckRollup": { |
| 345 | "contexts": { |
| 346 | "nodes": [ |
| 347 | { |
| 348 | "context": "tvm-ci/pr-head", |
| 349 | "targetUrl": target_url, |
| 350 | } |
| 351 | ] |
| 352 | } |
| 353 | }, |
| 354 | } |
| 355 | } |
| 356 | ] |
| 357 | } |
| 358 | } |
| 359 | comment = scripts.github.github_docs_comment.get_doc_url( |
| 360 | pr=pr_data, |
| 361 | base_docs_url=base_url, |
| 362 | ) |
| 363 | assert_in(expected_body, comment) |
| 364 | |
| 365 | |
| 366 | @tvm.testing.skip_if_wheel_test |
nothing calls this directly
no test coverage detected
searching dependent graphs…