diff --git a/tests/data/reviews/missing_community_partnerships.txt b/tests/data/reviews/missing_community_partnerships.txt new file mode 100644 index 0000000..870f195 --- /dev/null +++ b/tests/data/reviews/missing_community_partnerships.txt @@ -0,0 +1,22 @@ +Submitting Author: Fakename (@fakeauthor) +All current maintainers: (@fakeauthor1, @fakeauthor2) +Package Name: fake_package +One-Line Description of Package: A fake python package +Repository Link: https://example.com/fakeauthor1/fake_package +Version submitted: v1.0.0 +EiC: @fakeeic +Editor: @fakeeditor +Reviewers: @fakereviewer1 , @fakereviewer2, @fakereviewer3 +Reviews Expected By: fake date +Archive: [![DOI](https://example.com/fakearchive)](https://zenodo.org/records/8415866) +JOSS DOI: [![DOI](https://example.com/fakearchive)](https://doi.org/10.21105/joss.01450) +Version accepted: 2.0.0 ([repo](https://example.com/fakeauthor1/fake_package/releases/tag/v2.0.0), [pypi](https://pypi.org/project/fake_project/2.0.0), [archive](https://example.com/fakearchive)) +Date accepted (month/day/year): 06/29/2024 + +--- + +## Scope + +- [x] I agree to abide by [pyOpenSci's Code of Conduct][PyOpenSciCodeOfConduct] during the review process and in maintaining my package after should it be accepted. +- [x] I have read and will commit to package maintenance after the review as per the [pyOpenSci Policies Guidelines][Commitment]. +(etc) diff --git a/tests/integration/test_parse_issues.py b/tests/integration/test_parse_issues.py index 3e9d7b4..3cf3fa4 100644 --- a/tests/integration/test_parse_issues.py +++ b/tests/integration/test_parse_issues.py @@ -121,3 +121,16 @@ def test_parse_labels(issue_list, process_issues): issue.labels = labels review = process_issues.parse_issue(issue) assert review.labels == ["test", "another_label"] + + +def test_missing_community_partnerships(process_issues, data_file): + """ + Test handling of issues with a missing "## Community Partnerships" section. + + This is a smoke test to ensure graceful handling of this case. + """ + review = data_file("reviews/missing_community_partnerships.txt", True) + with pytest.warns( + UserWarning, match="## Community Partnerships not found in the list" + ): + review = process_issues.parse_issue(review)