From 1e3bc1633ba5064f88549078f90b0a4ede04dd3b Mon Sep 17 00:00:00 2001 From: PhilNewm Date: Sat, 23 Nov 2024 11:10:26 +0100 Subject: [PATCH] Add test changelog desc test --- tests/test_github_query.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_github_query.py b/tests/test_github_query.py index c1d9195..9c4bc49 100644 --- a/tests/test_github_query.py +++ b/tests/test_github_query.py @@ -277,6 +277,12 @@ def test_format_label(label_type_prefix: str) -> None: assert formatted_label == "**Bugfix**" +def test_get_changelog_description_no_descprition(): + pr_body = "## Changelog\r\n\r\n\r\nOn Maya scene exports only include the relevant history for the selected nodes downstream and upstream and not upstream, and also their downstream descendant children.\r\n\r\n## Additional info\r\n\r\n\r\nNote: This may affect maya scene exports, camera rig exports and layout exports. However, I do feel this is a way more sensible default behavior on exports _with_ construction history enabled.\r\n\r\nWith this change, if you have a hierarchy like:\r\n```\r\ngrp/\r\n obj1\r\n obj2\r\n```\r\nAnd `obj1` is inside the instance then after this PR `obj2` is not included.\r\nBefore this PR all other descendents from upstream groups would be included, regardless of whether they were \"inputs\" to the `obj1`.\r\n\r\nAfter this PR, if `obj2` is an input connection to `obj1` (e.g. there are active constraints driving `obj1` or some other connections driving it) then `obj2` **will still be included.**\r\n\r\nAs such, only objects actively contributing to members of the instance will still be included in the output.\r\n\r\n## Testing notes:\r\n\r\n1. Recreate the aforementioned hierarchy from additional info.\r\n2. Publish `obj1` - it should not include `obj2`\r\n3. Now make a connection from `obj2` to `obj1` (e.g. translate connection)\r\n4. Now `obj2` should also be included in `obj2`.\r\n5. Now disconnect the connection, and key `obj1` transforms.\r\n6. The keys should be exported along just fine." + changelog_desc_result: List[str] = conversion_logic.get_changelog_description(pr_body) + + assert changelog_desc_result == [] + def test_format_changelog_markdown_icons(merged_pr_samples: List[dict[str, str]], changelog_label_list_icons: List[str], changelog_markdown_icons: str) -> None: filtered_pr_list: List[conversion_logic.Changelog] = conversion_logic.filter_changes_per_label(pr_data=merged_pr_samples, changelog_label_list=changelog_label_list_icons) changelog_result: str = conversion_logic.format_changelog_markdown(changes=filtered_pr_list, changelog_label_list=changelog_label_list_icons)