Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

test failure: matplotlib.tests.test_mathtext.mathfont_stix_14_test.test #939

Closed
jdh2358 opened this Issue · 5 comments

4 participants

@jdh2358
Owner

I'm getting one test failure on v1.1.x (clean font cache, clean build):

FAIL: matplotlib.tests.test_mathtext.mathfont_stix_14_test.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/msierig/dev/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 36, in failer
    result = f(*args, **kwargs)
  File "/home/msierig/dev/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 140, in do_test
    '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /home/msierig/result_images/test_mathtext/mathfont_stix_14.png vs. /home/msierig/result_images/test_mathtext/expected-mathfont_stix_14.png (RMS 3377.889)

----------------------------------------------------------------------
Ran 1068 tests in 430.397s

I thought maybe the recent ttconv commit could be playing a role here so i tested on f929f74 and still see it, so 70e9c33 does not appear to be implicated. It looks like a small pixel shift in some of the characters. Anyone else seeing this?

Also, I was trying to run the single test semantics on this, and tried a few variants of:

msierig@pinchiepie:matplotlib.matplotlib> python tests.py  matplotlib.tests.test_mathtext:mathfont_stix_14_test.test
E
======================================================================
ERROR: Failure: ValueError (No such test mathfont_stix_14_test.test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_class(self.exc_val)
ValueError: No such test mathfont_stix_14_test.test

----------------------------------------------------------------------
Ran 1 test in 0.002s

What is the magic incantation for running this as a single test?

@jkseppan
Collaborator

You could also try 6741580, because there was another recent change to ttconv. But if the test failure is with the Agg backend, I don't think ttconv can affect it (except possibly via memory corruption), since it is only used when embedding TrueType fonts, and Agg just renders the font with freetype.

To run the single test, try

python tests.py matplotlib.tests.test_mathtext:test_mathfont_stix_14

Apparently the function gets generated with a name that's different from the global variable referencing it.

@jdh2358
Owner

Thanks for the single test incantation -- that worked. Unfortunately, I am still getting the test failure. I did revert to 6741580 but the problem is still there. I also reverted back to 5846304 when @mdboom stomped out all the test failures with @astrofrog, and this test was passing for me then (same machine) but not now. Since then I have upgraded to ubuntu 12.04, and presumably freetype was upgraded at the same time. I am now on 2.4.8, This is in the range that should pass according to the image decorator:

def make_test(filename, test):
    @image_comparison(baseline_images=[filename], extensions=extensions,
                      freetype_version=('2.4.5', '2.4.9'))

I pushed the failing image to jdh2358@4395e5e?diff-0=1-38

@efiring
Owner
@mdboom
Owner

Yeah -- let's push your image to the repository and hope that it's a closer to the mean than the one I generated.

@efiring
Owner

OK, pushed to v1.1.x in f763cd1...

@efiring efiring closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.