Skip to content

AttributesTest: simplify test code #933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2025

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 5, 2025

Description

  • Replace hard-coded "length" values provided via data providers with a simple count() calculation to prevent having to manually keep the length in sync with the contents of the tokenCodes arrays.
  • Replace magic numbers in the testNestedAttributes() test with the same calculations assigned to variables to make the test more descriptive.

Suggested changelog entry

N/A

* Replace hard-coded "length" values provided via data providers with a simple `count()` calculation to prevent having to manually keep the `length` in sync with the contents of the `tokenCodes` arrays.
* Replace magic numbers in the `testNestedAttributes()` test with the same calculations assigned to variables to make the test more descriptive.
@jrfnl jrfnl added this to the 3.12.2 milestone Apr 5, 2025
@jrfnl jrfnl merged commit 9981876 into master Apr 5, 2025
61 checks passed
@jrfnl jrfnl deleted the feature/tokenizer-attributestest-simplify branch April 5, 2025 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant