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

Raise missing ValueError in transform_angles #4458

Merged

Conversation

has2k1
Copy link
Contributor

@has2k1 has2k1 commented May 23, 2015

  • Includes a small PEP8 change
  • Added tests to cover the Transform.transform_angles method

new_angles = t.transform_angles(angles, points)
assert_array_almost_equal(angles, new_angles)

with assert_raises(ValueError) as cm:
Copy link
Member

Choose a reason for hiding this comment

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

for future coders, could you add a comment explaining the error you are triggering?

@WeatherGod
Copy link
Member

I restarted the failing test, now it is saying that assert_raises() takes three arguments... did nose bork a release or something?

@jenshnielsen
Copy link
Member

@WeatherGod Assert_raises can't be used as a context manager in python 2.6. I would suggest just skipping this test on python 2.6 as done in https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/tests/test_rcparams.py#L127

@WeatherGod
Copy link
Member

Didn't know that. Good to know!

On Sat, May 23, 2015 at 10:56 AM, Jens Hedegaard Nielsen <
notifications@github.com> wrote:

@WeatherGod https://github.com/WeatherGod Assert_raises can't be used
as a context manager in python 2.6. I would suggest just skipping this test
on python 2.6 as done in
https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/tests/test_rcparams.py#L127


Reply to this email directly or view it on GitHub
#4458 (comment)
.

- Includes a small PEP8 change
- Added tests to cover the `Transform.transform_angles` method
@has2k1 has2k1 force-pushed the fix-transform-angles-unraised-error branch from d3254ec to 06d0892 Compare May 23, 2015 18:44
@has2k1
Copy link
Contributor Author

has2k1 commented May 23, 2015

Well, that worked this time around.

Commented the tests.

WeatherGod added a commit that referenced this pull request May 23, 2015
Raise missing ValueError in transform_angles
@WeatherGod WeatherGod merged commit e1a52a9 into matplotlib:master May 23, 2015
@WeatherGod
Copy link
Member

This does not need backporting. The exception was only missing in master.

@tacaswell
Copy link
Member

@has2k1 Thanks! I should have caught that.

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

4 participants