Navigation Menu

Skip to content
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

patches.polygon: fix bug in handling of path closing, #1018. #1071

Merged
merged 3 commits into from Aug 12, 2012

Conversation

efiring
Copy link
Member

@efiring efiring commented Aug 12, 2012

This is a modification of that pull request, with a test added, both based on the comments on #1018

This is a modification of that pull request, with a test added.
return self._path.vertices

def set_xy(self, xy):
xy = np.asarray(xy, np.float_)
Copy link
Member

Choose a reason for hiding this comment

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

Is it necessary to explicitly cast this dtype to be floats? I'm not against it, I just don't see it done elsewhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

The cast was already in the code, but in fact it is not necessary because xy is passed to the Path initializer, which performs the cast. I can take it out.

@pelson
Copy link
Member

pelson commented Aug 12, 2012

One thing I would like to see more of is to have a docstring in the top of a test module explaining its purpose so that future developers know where to put their tests. In this case, what other tests do you think might go in the test_patches module in the future?

Additionally, I believe the test_patches module name needs to be put in matplotlib/__init__.py (see http://matplotlib.sourceforge.net/devel/coding_guide.html#creating-a-new-module-in-matplotlib-tests).

@efiring
Copy link
Member Author

efiring commented Aug 12, 2012

@pelson, I think that there are two primary categories of test modules: those that hold miscellaneous tests from a corresponding mpl module (e.g. test_axes), and those that hold tests of tricky behavior (e.g., test_simplification), sophisticated enough to warrant a separate module. So the purpose of test_patches is to hold the present test, and to provide a home for any additional such tests that are added as bugs are identified and fixed. This is all just my impression of how the use of nosetests has evolved; I don't think the strategy was ever fully planned and documented in detail.

efiring added a commit that referenced this pull request Aug 12, 2012
patches.polygon: fix bug in handling of path closing, #1018.
@efiring efiring merged commit 8a5afe3 into matplotlib:master Aug 12, 2012
@efiring efiring deleted the close_polygon branch May 29, 2013 02:10
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.

None yet

3 participants