Repository navigation
Fix bug in IntegerValidator when an array contains both strings and integers, and add tests for IntegerValidator extras - #4693
Merged
Conversation
archmoj
reviewed
Jul 26, 2024
| assert validator_min_max.validate_coerce(val) == approx(val) | ||
|
|
||
| # With extras | ||
| @pytest.mark.parametrize("val", ['normal', 'bold']) |
Contributor
There was a problem hiding this comment.
Thanks @marthacryan for the PR.
Could you please clarify which of these 3 cases we are testing here?

This is from https://github.com/plotly/plotly.py/pull/4612/files.
BTW I prefer to test all 3 cases.
archmoj
reviewed
Jul 26, 2024
Contributor
|
Please rename the title of the PR to indicate that this is a bug fix. |
archmoj
reviewed
Jul 26, 2024
Contributor
Author
@archmoj Added! How does it look? |
archmoj
approved these changes
Jul 27, 2024
archmoj
left a comment
Contributor
There was a problem hiding this comment.
💃
Excellent.
Please merge it and then delete the branch.
Thank you!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up PR to #4612. Adds basic tests for passing and rejecting - also fixes a bug found while testing where the integer validator threw an error when arrays contained both strings and integers.
Code PR
plotly.graph_objects, my modifications concern thecodegenfiles and not generated files.modified existing tests.
- [ ] For a new feature, I have added documentation examples in an existing ornew tutorial notebook (please see the doc checklist as well).
- [ ] For a new feature or a change in behaviour, I have updated the relevant docstrings in the code to describe the feature or behaviour (please see the doc checklist as well).