FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

font_styles test failing for some people · Issue #788 · matplotlib/matplotlib · GitHub

Repository navigation

font_styles test failing for some people #788

Closed

Description

Originally reported in issue #779 by @astrofrog.

I've tested this branch on MacOS 10.7 with freetype 2.4.9 (14.1.8), and all tests pass except three (the font_styles ones):

======================================================================
FAIL: matplotlib.tests.test_text.test_font_styles.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 35, in failer
    result = f(*args, **kwargs)
  File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 126, in do_test
    '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/Shared/Jenkins/Home/jobs/matplotlib-mdboom-tests-osx-10.7-multiconfig/workspace/NV/1.6.1/PV/2.7/result_images/test_text/font_styles.png vs. /Users/Shared/Jenkins/Home/jobs/matplotlib-mdboom-tests-osx-10.7-multiconfig/workspace/NV/1.6.1/PV/2.7/result_images/test_text/expected-font_styles.png (RMS 47.138)

======================================================================
FAIL: matplotlib.tests.test_text.test_font_styles.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 35, in failer
    result = f(*args, **kwargs)
  File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 126, in do_test
    '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/Shared/Jenkins/Home/jobs/matplotlib-mdboom-tests-osx-10.7-multiconfig/workspace/NV/1.6.1/PV/2.7/result_images/test_text/font_styles_pdf.png vs. /Users/Shared/Jenkins/Home/jobs/matplotlib-mdboom-tests-osx-10.7-multiconfig/workspace/NV/1.6.1/PV/2.7/result_images/test_text/expected-font_styles_pdf.png (RMS 23.409)

======================================================================
FAIL: matplotlib.tests.test_text.test_font_styles.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 35, in failer
    result = f(*args, **kwargs)
  File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 126, in do_test
    '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/Shared/Jenkins/Home/jobs/matplotlib-mdboom-tests-osx-10.7-multiconfig/workspace/NV/1.6.1/PV/2.7/result_images/test_text/font_styles_svg.png vs. /Users/Shared/Jenkins/Home/jobs/matplotlib-mdboom-tests-osx-10.7-multiconfig/workspace/NV/1.6.1/PV/2.7/result_images/test_text/expected-font_styles_svg.png (RMS 39.686)

The images are here: http://db.tt/7jOnhnwN

It looks as though somehow the font styles don't work on my system when anti-aliasing is disabled?

Activity

  1. mdboom commented on Mar 22, 2012

    MemberAuthor

    Does deleting your font cache (~/.matplotlib/fontList.cache) help?

  2. mdboom commented on Mar 22, 2012

    MemberAuthor

    Can you post your ~/.matplotlib/fontList.cache file? I suspect it isn't indexing the fonts correctly.

  3. astrofrog commented on Mar 22, 2012

    Contributor

    I tried removing it but the errors were still there.

    The re-generated file is here: http://db.tt/hPWBtpu0

  4. mdboom commented on Mar 22, 2012

    MemberAuthor

    Can you run this gist: https://gist.github.com/2159040

    Run with debugging messages on and post the console output (also check test.png to see if it looks styled).

    python font_styles.py --verbose-debug-annoying

  5. astrofrog commented on Mar 22, 2012

    Contributor

    Here is the log: http://pastebin.com/KbSyQ3ym

    The text is not styled.

  6. mdboom commented on Mar 22, 2012

    MemberAuthor

    Just to confirm, since I see it in the logs: Have you been removing (and sending me) /Users/Shared/Jenkins/Home/.matplotlib/fontList.cache (since this is running in the Jenkins context) and not ~/.matplotlib/fontList.cache?

    Still stumped as to what's going on. The fontList.cache you sent me works perfectly here (after updating the paths).

  7. astrofrog commented on Mar 22, 2012

    Contributor

    I did send the Jenkins one - but I think the one I had sent before was generated by Jenkins, so I removed it and then ran your script, which re-generated the file, and now the styles look fine. So somehow, in the restricted Jenkins environment, the font cache file that is generated has issues... I'm now going to run the Jenkins tests again with the fontList.cache file that was generated when I ran your script to see what happens. Anyway, it seems that this is an issue related to running in Jenkins rather than a real matplotlib bug. I'll report back.

  8. astrofrog commented on Mar 23, 2012

    Contributor

    Ok, this was indeed some strange artifact of running the tests on Jenkins. If I run the tests sequentially for different Python/Numpy versions, and remove fontList.cache between each run, then things work fine. The issue must be to do with the cache pointing to the fonts in the wrong matplotlib path (i.e. if the 2.7 & 1.6.1 tests run first, then the cache will contain fonts in the 2.7 & 1.6.1 path, which might confuse the other Python versions). Anyway, I don't think this is really a matplotlib bug, so this issue can be closed.

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


      Back | FazBrowse Home | New Git URL