Skip to content

Conversation

@Brun00000000
Copy link

Hello!

This PR introduces a comprehensive test suite for the _ember_production_mode_mapper helper function in the Ember capacity parser.

Changes:

Added Unit Tests: A new test file with 7 test cases has been created to validate the function's logic. These tests were designed using the Modified Condition/Decision Coverage (MC/DC) criterion.

Achieved 100% Coverage for the Target Function: The new tests provide 100% code coverage for the _ember_production_mode_mapper function itself, raising the file's overall coverage from 24% to 39%.

Bug Fix: A bug was identified and fixed during the testing process. The function would previously raise an UnboundLocalError if the input mode was not a string (e.g., None). It now correctly handles this edge case and returns None.

This contribution should increase the reliability and maintainability of the Ember parser.

Thank you for your time and review!

@Brun00000000 Brun00000000 requested a review from a team as a code owner November 2, 2025 02:39
@github-actions github-actions bot added python Pull requests that update Python code tests labels Nov 2, 2025
Copy link
Member

@VIKTORVAV99 VIKTORVAV99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR but please make sure all tests are passing and all comments are in english.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure that all comments are in english and remove the CT1, CT2 titles from the comments, they don't relate what is being tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests that update Python code tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants