Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_fontconfig_fonts error on Linux wheel testing #8152

Closed
matthew-brett opened this issue Feb 26, 2017 · 11 comments

Comments

Projects
None yet
5 participants
@matthew-brett
Copy link
Contributor

commented Feb 26, 2017

Testing the built wheel, I get the following error (using pytest):

=================================== FAILURES ===================================
__________________________ test_get_fontconfig_fonts ___________________________
[gw0] linux2 -- Python 2.7.6 /venv/bin/python2.7
@pytest.mark.skipif(sys.platform == 'win32', reason='no fontconfig on Windows')
    def test_get_fontconfig_fonts():
>       assert len(get_fontconfig_fonts()) > 1
E       assert 0 > 1
E        +  where 0 = len([])
E        +    where [] = get_fontconfig_fonts()

https://travis-ci.org/MacPython/matplotlib-wheels/jobs/205418240#L623

Should a bare Linux container like the testing container contain any fontconfig fonts? Or is some assumption being made about the configuration of the system?

@tacaswell

This comment has been minimized.

Copy link
Member

commented Feb 26, 2017

Blah, this test went into to verify that we can parse the output from fontconfig properly.

It is reasonable to expect that a testing system have at least one system-level font installed.

@QuLogic

This comment has been minimized.

Copy link
Member

commented Feb 26, 2017

Does fc-list --format='%{file}\n' output anything? Does fc-list exist on OSX (or does it need homebrew)?

@QuLogic

This comment has been minimized.

Copy link
Member

commented Feb 26, 2017

Oops, this is trusty, not OSX; yea I guess maybe a system font should exist there....

@matthew-brett

This comment has been minimized.

Copy link
Contributor Author

commented Feb 26, 2017

fc-list is not installed on the trusty container.

@matthew-brett

This comment has been minimized.

Copy link
Contributor Author

commented Feb 26, 2017

Reasonable to skip this test when fontconfig / fc-list not installed?

@QuLogic

This comment has been minimized.

Copy link
Member

commented Feb 26, 2017

Interestingly, fontconfig is not listed in the dependencies, optional or not, even though it's used by FontManager regardless of the USE_FONTCONFIG setting. Do the rest of the tests run correctly even without fontconfig?

@matthew-brett

This comment has been minimized.

Copy link
Contributor Author

commented Feb 26, 2017

@QuLogic

This comment has been minimized.

Copy link
Member

commented Feb 26, 2017

Yes, but:

!!!!!!!!!!!! xdist.dsession.Interrupted: stopping after 1 failures !!!!!!!!!!!!!
======== 1 failed, 840 passed, 221 skipped, 8 xfailed in 189.47 seconds ========

That's not even close to all the tests.

@matthew-brett

This comment has been minimized.

Copy link
Contributor Author

commented Feb 26, 2017

Right - but for the 2.0.0 builds, on the same container, the tests did run : https://travis-ci.org/MacPython/matplotlib-wheels/jobs/195613539 . So, at least for 2.0.0, I believe fontconfig was not required.

@dstansby dstansby added the Testing label Feb 27, 2017

@tacaswell

This comment has been minimized.

Copy link
Member

commented Mar 2, 2017

We hit fontconfig (if it is available) and then also search our internal data folders. If the call to fc-list fails, we just treat that as it returning [], thus fc-list is optional, but should be required for testing.

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Mar 2, 2017

@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0.2 (next bug fix release) May 3, 2017

@tacaswell tacaswell modified the milestones: 2.1.1 (next bug fix release), 2.2 (next feature release) Oct 9, 2017

@anntzer

This comment has been minimized.

Copy link
Contributor

commented Jan 11, 2018

Closed by #8213, afaict.

@anntzer anntzer closed this Jan 11, 2018

@QuLogic QuLogic modified the milestones: v2.2, v2.1 Jan 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.