File size: 492 Bytes
a995e56 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | from pathlib import Path
import pytest
@pytest.mark.parametrize(
("filename", "label"),
[
("bug-report.yml", "bug"),
("feature-request.yml", "enhancement"),
],
)
def test_issue_forms_classify_with_labels_not_title_prefixes(
filename: str,
label: str,
) -> None:
form = Path(".github/ISSUE_TEMPLATE", filename).read_text(encoding="utf-8")
assert f" - {label}" in form
assert not any(line.startswith("title:") for line in form.splitlines())
|