jackdewinter / pymarkdown

MIT License
75 stars 17 forks source link

https://github.com/jackdewinter/pymarkdown/issues/1231 #1232

Closed jackdewinter closed 1 month ago

jackdewinter commented 1 month ago

https://github.com/jackdewinter/pymarkdown/issues/1231

closes #1231

Summary by Sourcery

Refactor test structure by moving triple nested container tests into separate files and add comprehensive test cases for nested block quotes, lists, and code blocks.

Enhancements:

Tests:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request makes significant changes to the test suite, particularly focusing on reorganizing and expanding tests for nested Markdown structures. It also includes some minor changes to documentation and configuration files.

Class diagram for test functions in nested_three_block_unordered_block

classDiagram
    class TestNestedThreeBlockUnorderedBlock {
        +test_nested_three_block_unordered_block_fenced_empty_with_thematics()
        +test_nested_three_block_unordered_block_fenced_empty_with_blanks_with_thematics()
        +test_nested_three_block_unordered_block_fenced_with_thematics()
        +test_nested_three_block_unordered_block_fenced_with_blanks_with_thematics()
        +test_nested_three_block_unordered_block_fenced_with_text_before_with_thematics()
        +test_nested_three_block_unordered_block_fenced_with_blanks_with_text_before_with_thematics()
        +test_nested_three_block_unordered_block_fenced_with_text_after_with_thematics()
        +test_nested_three_block_unordered_block_fenced_with_blanks_with_text_after_with_thematics()
        +test_nested_three_block_unordered_block_fenced_multiline_with_thematics()
        +test_nested_three_block_unordered_block_thematics_around_text_lines()
        +test_nested_three_block_unordered_block_thematics_around_blanks_around_text_lines()
        +test_nested_three_block_unordered_block_thematics_around_text_lines_with_text_after()
        +test_nested_three_block_unordered_nl_block_drop_block_thematics_around_fenced_code_block()
        +test_nested_three_block_unordered_nl_block_drop_block_thematics_around_blanks_around_fenced_code_block()
        +test_nested_three_block_unordered_block_extra_list__li_drop_list_thematics_around_fenced_code_block()
        +test_nested_three_block_unordered_block_extra_list__li_drop_list_thematics_around_blanks_around_fenced_code_block()
        +test_nested_three_block_unordered_block_extra_block_single_line_drop_block_thematics_around_fenced_code_block()
        +test_nested_three_block_unordered_block_extra_block_drop_block_thematics_around_fenced_code_block()
        +test_nested_three_block_unordered_block_extra_block_drop_block_thematics_around_blanks_around_fenced_code_block()
        +test_nested_three_block_unordered_block_extra_block_drop_block_with_fenced_code_block()
        +test_nested_three_block_unordered_block_extra_block_drop_block_with_blanks_around_fenced_code_block()
        +test_nested_three_block_unordered_block_extra_block_with_extra_single_indent_drop_block_with_fenced_code_block()
        +test_nested_three_block_unordered_block_extra_block_with_extra_double_indent_drop_block_with_fenced_code_block()
        +test_nested_three_block_unordered_block_extra_block_with_extra_triple_indent_drop_block_with_fenced_code_block()
        +test_nested_three_block_unordered_block_extra_block_drop_block_extra_block_drop_block_fenced()
        +test_nested_three_block_unordered_block_extra_block_drop_block_extra_block_drop_block_blanks_around_fenced()
        +test_nested_three_block_unordered_nl_block_drop_block_with_fenced()
        +test_nested_three_block_unordered_nl_block_drop_block_with_blanks_around_fenced()
        +test_nested_three_block_unordered_block_thematics_around_text_and_fenced()
        +test_nested_three_block_unordered_block_thematics_around_text_and_blanks_around_fenced()
        +test_nested_three_block_unordered_block_thematic_drop_block_and_list_with_text()
        +test_nested_three_block_unordered_block_thematic_nl_text_drop_block_and_list_with_text()
        +test_nested_three_block_unordered_block_thematic_nl_fenced_with_drop_block_li()
        +test_nested_three_block_unordered_block_fenced_with_drop_right_after()
        +test_nested_three_block_unordered_block_empty_fenced_with_drop_right_after()
        +test_nested_three_block_unordered_block_thematics_around_blanks_around_text_drop_block_li_li_extra_block_drop_block_li()
        +test_nested_three_block_unordered_block_thematics_around_blank_drop_block_li_text()
        +test_nested_three_block_unordered_block_thematics_around_blank_drop_block_li_extra_block_text()
        +test_nested_three_block_unordered_nl_block_drop_block_headings_around_fenced()
        +test_nested_three_block_unordered_nl_block_drop_block_blank_thematics_around_fenced()
        +test_nested_three_block_unordered_extra_block_with_no_space_after_drop_block_thematics_around_fenced()
        +test_nested_three_block_unordered_extra_block_drop_block_thematic_extra_block_drop_block_thematics_around_fenced()
        +test_nested_three_block_unordered_extra_list_drop_list_thematics_around_fenced()
    }

Class diagram for test functions in nested_three_ordered_block_unordered

classDiagram
    class TestNestedThreeOrderedBlockUnordered {
        +test_nested_three_ordered_block_unordered_nl_extra_block_drop_block_fenced()
        +test_nested_three_ordered_block_unordered_nl_extra_block_drop_block_blanks_around_fenced()
        +test_nested_three_ordered_block_unordered_thematics_around_fenced()
        +test_nested_three_ordered_block_unordered_extra_block_drop_block_with_headings_around_fenced()
        +test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_fenced()
        +test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_blanks_around_fenced()
        +test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_thematics_around_fenced()
        +test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_thematics_around_blanks_around_fenced()
        +test_nested_three_ordered_block_unordered_li_with_empty_prefix_extra_block_drop_block_headings_around_text()
        +test_nested_three_ordered_block_unordered_extra_block_drop_block_headings_around_text()
        +test_nested_three_ordered_block_unordered_thematics_around_headings_around_text()
        +test_nested_three_ordered_block_unordered_extra_block_drop_block_thematics_around_text()
        +test_nested_three_ordered_block_unordered_extra_block_drop_block_html_around_text()
    }

File-Level Changes

Change Details Files
Reorganized and expanded tests for triple nested container structures
  • Moved triple nested container tests into their own test_nestedthree* files
  • Added new test cases for various nested Markdown structures
  • Updated existing test cases with additional assertions and scenarios
test/nested_three/test_markdown_nested_three_block_unordered_block.py
test/nested_three/test_markdown_nested_three_block_block_unordered.py
test/nested_three/test_markdown_nested_three_ordered_block_block.py
test/nested_three/test_markdown_nested_three_ordered_block_unordered.py
test/nested_three/test_markdown_nested_three_block_block_block.py
test/nested_three/test_markdown_nested_three_block_block_ordered_max.py
test/nested_three/test_markdown_nested_three_unordered_unordered_unordered.py
test/nested_three/test_markdown_nested_three_unordered_unordered_block.py
Updated test result statistics and configurations
  • Modified test result counts in test-results.json
  • Removed skipped tests in some cases
  • Updated test configurations and expected outputs
publish/test-results.json
test/rules/test_md031.py
test/rules/test_md027.py
Made minor changes to documentation and configuration
  • Updated changelog.md with information about Issue 1231
  • Removed skip annotation from a test in test_api_scan.py
newdocs/src/changelog.md
test/api/test_api_scan.py

Assessment against linked issues

Issue Objective Addressed Explanation
#1231 Move triple-container tests from test_extra to nested test files.
#1231 Make the tests more maintainable and less bulky

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (f21de30) to head (69f549d). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1232 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 191 191 Lines 21037 21037 Branches 2683 2683 ========================================= Hits 21037 21037 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.