Skip to content

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

Closed

Description

@jdh2358

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?

Activity

  1. jkseppan commented on Jun 9, 2012

    @jkseppan
    Member

    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.

  2. jdh2358 commented on Jun 9, 2012

    @jdh2358
    CollaboratorAuthor

    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

  3. efiring commented on Jun 9, 2012

    @efiring
    Member

    On 06/09/2012 03:17 AM, John Hunter wrote:

    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
    

    John,

    I get this, too; Mike doesn't. It's a PITA, but I wouldn't worry about
    it. My inclination is to replace the expected result image, because I
    think that what I get looks better (more evenly spaced) than what is in
    there; but then the test would break for Mike, and who knows how many
    others.

    Eric

    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?


    Reply to this email directly or view it on GitHub:
    #939

  4. mdboom commented on Jun 11, 2012

    @mdboom
    Member

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

  5. efiring commented on Jun 11, 2012

    @efiring
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions