Running tests on latest master

Hello,

I've just checked out the source code from github, and I ran the
tests. Unfortunately, I get loads of errors (more than 1k), most of
them such as the following:

···

======================================================================
ERROR: matplotlib.tests.test_text.test_multiline.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/bioinfo/users/nvaroqua/Projects/matplotlib/env/lib/python2.6/site-packages/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File "/bioinfo/users/nvaroqua/Projects/matplotlib/env/lib/python2.6/site-packages/matplotlib/testing/decorators.py",
line 39, in failer
    result = f(*args, **kwargs)
  File "/bioinfo/users/nvaroqua/Projects/matplotlib/env/lib/python2.6/site-packages/matplotlib/testing/decorators.py",
line 148, in do_test
    self._tol, in_decorator=True)
  File "/bioinfo/users/nvaroqua/Projects/matplotlib/env/lib/python2.6/site-packages/matplotlib/testing/compare.py",
line 311, in compare_images
    h1h = np.histogram(h1p, bins=bins)[0]
NameError: global name 'bins' is not defined

I've tried to have a look at the code, and indeed 'bins' is not
defined in this method. I'm not sure if this could be an installation
problem. Any idea how I could fix that ?

Many thanks,
N

PS: the developpers mailing list is *really* hard to find.

Looks like you triggered a code-path that most of us haven’t encountered. The code in question checks for which version of numpy is installed and uses the faster bincount if it is available and falls back to the older testing code if it isn’t available. Unfortunately, the older code seems to have been bastardized in the process. This should defintely be fixed.

I might have a moment today to submit a PR for this.

Ben Root

···

On Tue, Aug 28, 2012 at 9:47 AM, Nelle Varoquaux <nelle.varoquaux@…149…> wrote:

Hello,

I’ve just checked out the source code from github, and I ran the

tests. Unfortunately, I get loads of errors (more than 1k), most of

them such as the following:

Heh, looks like it was a typo in line 305: change “ns” to “bins”

Ben

···

On Tue, Aug 28, 2012 at 9:58 AM, Benjamin Root <ben.root@…553…> wrote:

On Tue, Aug 28, 2012 at 9:47 AM, Nelle Varoquaux <nelle.varoquaux@…149…> wrote:

Hello,

I’ve just checked out the source code from github, and I ran the

tests. Unfortunately, I get loads of errors (more than 1k), most of

them such as the following:

Looks like you triggered a code-path that most of us haven’t encountered. The code in question checks for which version of numpy is installed and uses the faster bincount if it is available and falls back to the older testing code if it isn’t available. Unfortunately, the older code seems to have been bastardized in the process. This should defintely be fixed.

I might have a moment today to submit a PR for this.

Ben Root

Hello,

I've just checked out the source code from github, and I ran the
tests. Unfortunately, I get loads of errors (more than 1k), most of
them such as the following:

Looks like you triggered a code-path that most of us haven't encountered.
The code in question checks for which version of numpy is installed and uses
the faster bincount if it is available and falls back to the older testing
code if it isn't available. Unfortunately, the older code seems to have
been bastardized in the process. This should defintely be fixed.

I might have a moment today to submit a PR for this.

Ben Root

Heh, looks like it was a typo in line 305: change "ns" to "bins"

I have flake8 running automatically in my text editors, and I have a
bunch of warning. On the testing/compare.py files I've got:

compare.py|11| W402 'image_util' imported but unused
compare.py|16| W402 'math' imported but unused
compare.py|17| W402 'operator' imported but unused
compare.py|23| W402 'reduce' imported but unused
compare.py|305| W806 local variable 'ns' is assigned to but never used
compare.py|311| W802 undefined name 'bins'
compare.py|312| W802 undefined name 'bins'

and a bunch of pep8 warning. Are you guys interested in patches fixing
those ? It would then be easier to spot errors such as the previous
one.

Thanks,
N

···

On 28 August 2012 16:01, Benjamin Root <ben.root@...553...> wrote:

On Tue, Aug 28, 2012 at 9:58 AM, Benjamin Root <ben.root@...553...> wrote:

On Tue, Aug 28, 2012 at 9:47 AM, Nelle Varoquaux >> <nelle.varoquaux@...149...> wrote:

Ben

Wouldn’t hurt. We usually do PEP8 cleanups right before RC releases anyway. The testing code tends to get ignored, so any sort of attention here would be great.

Ben Root

···

On Tue, Aug 28, 2012 at 10:06 AM, Nelle Varoquaux <nelle.varoquaux@…149…> wrote:

On 28 August 2012 16:01, Benjamin Root <ben.root@…553…> wrote:

On Tue, Aug 28, 2012 at 9:58 AM, Benjamin Root <ben.root@…553…> wrote:

On Tue, Aug 28, 2012 at 9:47 AM, Nelle Varoquaux > > >> <nelle.varoquaux@…55…149…> wrote:

Hello,

I’ve just checked out the source code from github, and I ran the

tests. Unfortunately, I get loads of errors (more than 1k), most of

them such as the following:

Looks like you triggered a code-path that most of us haven’t encountered.

The code in question checks for which version of numpy is installed and uses

the faster bincount if it is available and falls back to the older testing

code if it isn’t available. Unfortunately, the older code seems to have

been bastardized in the process. This should defintely be fixed.

I might have a moment today to submit a PR for this.

Ben Root

Heh, looks like it was a typo in line 305: change “ns” to “bins”

I have flake8 running automatically in my text editors, and I have a

bunch of warning. On the testing/compare.py files I’ve got:

compare.py|11| W402 ‘image_util’ imported but unused

compare.py|16| W402 ‘math’ imported but unused

compare.py|17| W402 ‘operator’ imported but unused

compare.py|23| W402 ‘reduce’ imported but unused

compare.py|305| W806 local variable ‘ns’ is assigned to but never used

compare.py|311| W802 undefined name ‘bins’

compare.py|312| W802 undefined name ‘bins’

and a bunch of pep8 warning. Are you guys interested in patches fixing

those ? It would then be easier to spot errors such as the previous

one.

Thanks,

N