Skip to content

test: add unit tests for _plotly_utils string helpers#5669

Open
DogInfantry wants to merge 1 commit into
plotly:mainfrom
DogInfantry:test/plotly-utils-string-helpers
Open

test: add unit tests for _plotly_utils string helpers#5669
DogInfantry wants to merge 1 commit into
plotly:mainfrom
DogInfantry:test/plotly-utils-string-helpers

Conversation

@DogInfantry

Copy link
Copy Markdown

Adds unit coverage for pure string/utility helpers in _plotly_utils/utils.py that currently have no tests. These functions back the "did you mean" suggestions and path parsing used in validator error messages.

Covered:

  • levenshtein
  • find_closest_string
  • split_multichar
  • split_string_positions
  • display_string_positions
  • chomp_empty_strings
  • is_skipped_key
  • _natural_sort_strings

Notes:

Verification: pytest tests/test_plotly_utils/test_utils.py -> 34 passed; ruff check and ruff format --check clean.

Cover the previously untested pure helpers in _plotly_utils/utils.py:
levenshtein, find_closest_string, split_multichar, split_string_positions,
display_string_positions, chomp_empty_strings, is_skipped_key, and
_natural_sort_strings. Expected values come from the function docstrings and
were confirmed against actual output. Follows the pattern of the recent
utility test PRs.
@DogInfantry

Copy link
Copy Markdown
Author

Hi maintainers, friendly ping on this one. The Python CI workflows are sitting at action_required (the first-time-contributor approval gate), so the test suite hasn't run yet. Whenever someone has a moment, could a maintainer approve and run the workflows? Happy to rebase or address any feedback. Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant