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

One-off doctest failures in a fresh install because of matplotlib #20222

Closed
defeo opened this issue Mar 16, 2016 · 28 comments
Closed

One-off doctest failures in a fresh install because of matplotlib #20222

defeo opened this issue Mar 16, 2016 · 28 comments

Comments

@defeo
Copy link
Member

defeo commented Mar 16, 2016

When running Sage doctests for the very first time (with an empty DOT_SAGE directory):

sage -t --long src/sage/geometry/fan.py
**********************************************************************
File "src/sage/geometry/fan.py", line 2887, in sage.geometry.fan.?.plot
Failed example:
    fan.plot()
Expected:
    Graphics object consisting of 31 graphics primitives
Got:
    doctest:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
    Graphics object consisting of 31 graphics primitives
**********************************************************************
1 item had failures:
   1 of   3 in sage.geometry.fan.?.plot
    [492 tests, 1 failure, 9.60 s]
sage -t --long src/sage/categories/coxeter_groups.py
**********************************************************************
File "src/sage/categories/coxeter_groups.py", line 1681, in sage.categories.coxeter_groups.CoxeterGroups.ElementMethods.bruhat_lower_cov
ers
Failed example:
    P.show()
Expected nothing
Got:
    doctest:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
**********************************************************************
1 item had failures:
   1 of  15 in sage.categories.coxeter_groups.CoxeterGroups.ElementMethods.bruhat_lower_covers
    [461 tests, 1 failure, 18.31 s]

Of course, the failures go away when the tests are rerun. Any way we can avoid these failures?

CC: @jdemeyer @embray @nthiery

Component: build

Author: Jeroen Demeyer

Branch: 7169df8

Reviewer: Erik Bray, Julian Rüth

Issue created by migration from https://trac.sagemath.org/ticket/20222

@defeo defeo added this to the sage-7.1 milestone Mar 16, 2016
@jdemeyer
Copy link

comment:1

Running tests inside a fresh docker container could be a good way to check for problems like this.

@embray
Copy link
Contributor

embray commented Mar 16, 2016

comment:2

Still don't have automated builds of the sagemath-develop container running yet, but hope to have that sooner or later.

@jdemeyer
Copy link

comment:4

Can't we simply ignore these warnings?

@defeo
Copy link
Member Author

defeo commented Oct 25, 2016

comment:5

Replying to @jdemeyer:

Can't we simply ignore these warnings?

What's the standard way to ignore warnings in doctests, again?

@embray
Copy link
Contributor

embray commented Nov 7, 2016

comment:6

I wonder if the initial sage startup shouldn't also take care of this.

@jdemeyer
Copy link

jdemeyer commented Nov 7, 2016

comment:7

Replying to @embray:

I wonder if the initial sage startup shouldn't also take care of this.

That's not really possible because the relevant matplotlib files are user files (inside $DOT_SAGE, which is typically in $HOME), not system files.

@embray
Copy link
Contributor

embray commented Nov 7, 2016

comment:8

I think I see what you're saying--I'm so used at this point to running my own copy of sage that it's warped my viewpoint in ugly ways :)

But isn't there some initial creation of user files in $DOT_SAGE the first time a user runs Sage? That's what I meant.

@mkoeppe
Copy link
Member

mkoeppe commented Jan 1, 2017

comment:9

Upstream issue: matplotlib/matplotlib#5836

@jdemeyer
Copy link

@jdemeyer
Copy link

New commits:

e2083fcBuild Matplotlib font cache before running doctests

@jdemeyer
Copy link

Author: Jeroen Demeyer

@jdemeyer
Copy link

Commit: e2083fc

@embray
Copy link
Contributor

embray commented Jun 14, 2017

comment:12

Huh, I thought this was already fixed. I haven't run into it in a while.

@jdemeyer
Copy link

Reviewer: Erik Bray

@vbraun
Copy link
Member

vbraun commented Jun 14, 2017

comment:14
sage -t --long --warn-long 81.6 src/sage/tests/startup.py
**********************************************************************
File "src/sage/tests/startup.py", line 6, in sage.tests.startup
Failed example:
    'numpy' in sys.modules
Expected:
    False
Got:
    True
**********************************************************************
File "src/sage/tests/startup.py", line 8, in sage.tests.startup
Failed example:
    'pyparsing' in sys.modules
Expected:
    False
Got:
    True
**********************************************************************
1 item had failures:
   2 of   7 in sage.tests.startup
    [6 tests, 2 failures, 1.47 s]

@jdemeyer jdemeyer changed the title One-off doctest failures in a fresh install One-off doctest failures in a fresh install because of matplotlib Jun 19, 2017
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 19, 2017

Changed commit from e2083fc to dd1dfe4

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 19, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

dd1dfe4Build Matplotlib font cache before running doctests

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 19, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

59e671eBuild Matplotlib font cache before running doctests

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 19, 2017

Changed commit from dd1dfe4 to 59e671e

@jdemeyer
Copy link

comment:18

New version which imports matplotlib in a forked child process.

@jdemeyer

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 25, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

7169df8Build Matplotlib font cache before running doctests

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 25, 2017

Changed commit from 59e671e to 7169df8

@saraedum
Copy link
Member

Changed reviewer from Erik Bray to Erik Bray, Julian Rüth

@vbraun
Copy link
Member

vbraun commented Jan 15, 2018

@jhpalmieri
Copy link
Member

comment:22

I'm seeing these failures again in 8.3.beta1.

@jhpalmieri
Copy link
Member

Changed commit from 7169df8 to none

@jhpalmieri
Copy link
Member

comment:23

See #25375 for a followup ticket.

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

No branches or pull requests

7 participants