FIX nose.tools.assert_is is only supported with python2.7 #1162

Merged
merged 1 commit into from Sep 2, 2012

Projects

None yet

3 participants

@NelleV
Collaborator
NelleV commented Aug 28, 2012

assert_is is only supported in python2.7.

I've got other tests failing on my box, but I don't know how to fix them: http://bpaste.net/show/unemAaLZCxFixslh2FBi/

Thanks,
Nelle

@pelson pelson commented on the diff Aug 29, 2012
lib/matplotlib/tests/test_figure.py
ax2 = fig.add_subplot(121, projection='polar')
- assert_is(fig.gca(), ax2)
- assert_is(fig.gca(polar=True), ax2)
-
+ assert_true(fig.gca() is ax2)
+ assert_true(fig.gca(polar=True)is ax2)
@pelson
pelson Aug 29, 2012 Matplotlib Developers member

seems to be a space missing.

@pelson
Member
pelson commented Aug 29, 2012

Looks good to me. I'm quite surprised that this is a python version issue and not a nose version issue. Did you find this stated explicitly somewhere?

@pelson
Member
pelson commented Aug 29, 2012

The other problems should ideally be raised in another issue. (with the image differences, did you check the two versions and see the differences?)

@NelleV
Collaborator
NelleV commented Aug 29, 2012

Nose only provides a warper around unittest that makes the assert* method pep8 compatible. assertIs was introduced in the standard library's unittest only for python2.7. Hence, nose doesn't expose assert_is for python2.5 and python2.6.

I've asked a bit if there were buildbots or jenkins running for matplotlib. If not, I can maybe try to set one up with python2.5 on the french python association server. Else, shiningpanda provides a jenkin installation for free for opensource softwares. That would allow to pick up on those non trivial and annoying problems :)

For the differences in the images, it looked to me like a font rendering problem. I can investigate the issues and open a bug report.

@pelson
Member
pelson commented Aug 29, 2012

note: Deleted posts from @NelleV which were intended for another PR.

@mdboom
Member
mdboom commented Aug 29, 2012

@NelleV: I python2.6 buildbot would be helpful, but matplotlib no longer officially supports python2.5 as of the 1.2 release (because it's so difficult to write 2/3 compatible code and support 2.5).

I have investigated shiningpanda and the past. Unfortunately, the runtimes of the matplotlib unit tests are so large that we use 3 times the daily CPU unit for a free project in a single test run, so it's kind of a no go. There is some Travis support in matplotlib now, but I haven't had a chance to really dig down into what it gives us yet.

As for the font difference, it may be that the test needs to be limited to a particular range of freetype versions, as some of our tests already do.

@NelleV
Collaborator
NelleV commented Aug 29, 2012

@mdboom Should I have a look at how to set this up ? I can have the build run every half an hour or every hour (that depends on the load of the server) if I have the permission of the AFPy.

It seems sane to me not support python2.5 anymore :)

@mdboom
Member
mdboom commented Aug 29, 2012

I'm in the process of getting the Travis set up now -- that should test multiple versions of Python. Assuming this works, we may not need to take you up on your generous offer. It probably wouldn't hurt to have our own Travis instances running in various places, though.

@pelson pelson merged commit 3649d2b into matplotlib:master Sep 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment