Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix bug in IntegerValidator when an array contains both strings and integers, and add tests for IntegerValidator extras #4693

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
archmoj merged 6 commits into plotly:master from marthacryan:extras-tests
Jul 29, 2024

Conversation

@marthacryan
Copy link
Collaborator

@marthacryan marthacryan commented Jul 26, 2024
edited
Loading

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

  • I have read through the contributing notes and understand the structure of the package. In particular, if my PR modifies code of plotly.graph_objects, my modifications concern the codegen files and not generated files.
  • I have added tests (if submitting a new feature or correcting a bug) or
    modified existing tests.
    (削除) - [ ] For a new feature, I have added documentation examples in an existing or
    new tutorial notebook (please see the doc checklist as well). (削除ここまで)
  • I have added a CHANGELOG entry if fixing/changing/adding anything substantial.
    (削除) - [ ] 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). (削除ここまで)

assert validator_min_max.validate_coerce(val) == approx(val)

# With extras
@pytest.mark.parametrize("val", ['normal', 'bold'])
Copy link
Contributor

@archmoj archmoj Jul 26, 2024
edited
Loading

Choose a reason for hiding this comment

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

Thanks @marthacryan for the PR.
Could you please clarify which of these 3 cases we are testing here?
PR_diff
This is from https://github.com/plotly/plotly.py/pull/4612/files.

BTW I prefer to test all 3 cases.

Copy link
Collaborator Author

@marthacryan marthacryan Jul 26, 2024

Choose a reason for hiding this comment

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

Done

archmoj reacted with hooray emoji
Copy link
Contributor

archmoj commented Jul 26, 2024

Please rename the title of the PR to indicate that this is a bug fix.
Also please add a changelog entry.

- [ ] I have added a CHANGELOG entry if fixing/changing/adding anything substantial

Copy link
Collaborator Author

Please rename the title of the PR to indicate that this is a bug fix. Also please add a changelog entry.

- [ ] I have added a CHANGELOG entry if fixing/changing/adding anything substantial

@archmoj Added! How does it look?

@marthacryan marthacryan changed the title (削除) Add tests for IntegerValidator extras (削除ここまで) (追記) Fix bug in IntegerValidator when an array contains both strings and integers, and add tests for IntegerValidator extras (追記ここまで) Jul 26, 2024
Copy link
Contributor

@archmoj archmoj left a comment

Choose a reason for hiding this comment

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

💃
Excellent.
Please merge it and then delete the branch.
Thank you!

@archmoj archmoj merged commit 5e2d3d8 into plotly:master Jul 29, 2024
@marthacryan marthacryan deleted the extras-tests branch July 29, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@archmoj archmoj archmoj approved these changes

Reviewers whose approvals may not affect merge requirements

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /