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

Appearance settings

Add test for Path.contains_path #25730

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 21, 2023
Merged

Conversation

oscargus
Copy link
Member

PR Summary

This was untested.

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

@oscargus oscargus changed the title Add test for Path.path_in_path Add test for Path.contains_path Apr 20, 2023
@tacaswell
Copy link
Member

doc failure is due to the issues with the website.

@tacaswell tacaswell added this to the v3.8.0 milestone Apr 20, 2023
lib/matplotlib/tests/test_path.py Outdated Show resolved Hide resolved
lib/matplotlib/tests/test_path.py Outdated Show resolved Hide resolved
Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

Can we add a test case with a non convex polygon so that all points of the other are inside, but some part of the edge goes outside; e.g. (sorry for the poor formatting, I’m on mobile)

-0.1, -0.1
-0.1, 1.2
0.5, 0.8
1.1, 1.2
1.1, -0.1

This is a rectangle with a kink at the top so that all nodes of the unit square are inside, but the top edge of the unit square is partially outside.

@oscargus
Copy link
Member Author

I've added such a test (third one).

@timhoffm timhoffm merged commit e631edb into matplotlib:main Apr 21, 2023
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.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.