Status: Accepted
Owner: ondrej.certik
Labels: Type-Defect Priority-Medium

New issue 1874 by ondrej.certik: mpmath plot tests fail on buildbots
http://code.google.com/p/sympy/issues/detail?id=1874

entrypoint: test_axes

    def test_axes():
        try:
            import pylab
        except ImportError:
            print "\nSkipping test (pylab not available)\n"
            return
       fig = pylab.figure()

[/home/buildslave/Buildbot/py2.4-
libs/build/sympy/mpmath/tests/test_visualization.py:15]


    def figure(num=None, # autoincrement if None, else integer from 1-N
               figsize   = None, # defaults to rc figure.figsize
               dpi       = None, # defaults to rc figure.dpi
               facecolor = None, # defaults to rc figure.facecolor
               edgecolor = None, # defaults to rc figure.edgecolor
               frameon = True,
               FigureClass = Figure,
               **kwargs
               ):
        """
        call signature::

          figure(num=None, figsize=(8, 6), dpi=80, facecolor='w',
edgecolor='k')


        Create a new figure and return a :class:`matplotlib.figure.Figure`
        instance.  If *num* = *None*, the figure number will be
incremented and
        a new figure will be created.  The returned figure objects have a
        *number* attribute holding this number.

        If *num* is an integer, and ``figure(num)`` already exists, make
it
        active and return a reference to it.  If ``figure(num)`` does not
exist
        it will be created.  Numbering starts at 1, matlab style::

          figure(1)

        If you are creating many figures, make sure you explicitly call
"close"
        on the figures you are not using, because this will enable pylab
        to properly clean up the memory.

        Optional keyword arguments:

          =========
=======================================================
          Keyword     Description
          =========
=======================================================
          figsize     width x height in inches; defaults to rc
figure.figsize
          dpi         resolution; defaults to rc figure.dpi
          facecolor   the background color; defaults to rc
figure.facecolor
          edgecolor   the border color; defaults to rc figure.edgecolor
          =========
=======================================================

        rcParams defines the default values, which can be modified in the
        matplotlibrc file

        *FigureClass* is a :class:`~matplotlib.figure.Figure` or derived
        class that will be passed on to :meth:`new_figure_manager` in the
        backends which allows you to hook custom Figure classes into the
        pylab interface.  Additional kwargs will be passed on to your
        figure init function.
        """

        if figsize is None   : figsize   = rcParams['figure.figsize']
        if dpi is None       : dpi       = rcParams['figure.dpi']
        if facecolor is None : facecolor = rcParams['figure.facecolor']
        if edgecolor is None : edgecolor = rcParams['figure.edgecolor']

        if num is None:
            allnums = [f.num for f in
_pylab_helpers.Gcf.get_all_fig_managers()]
            if allnums:
                num = max(allnums) + 1
            else:
                num = 1
        else:
            num = int(num)  # crude validation of num argument


        figManager = _pylab_helpers.Gcf.get_fig_manager(num)
        if figManager is None:
            if get_backend().lower() == 'ps':  dpi = 72

            figManager = new_figure_manager(num, figsize=figsize,
                                                 dpi=dpi,
                                                 facecolor=facecolor,
                                                 edgecolor=edgecolor,
                                                 frameon=frameon,
                                                 FigureClass=FigureClass,
                                                **kwargs)

[/usr/lib/pymodules/python2.6/matplotlib/pyplot.py:254]


    def new_figure_manager(num, *args, **kwargs):
        """
        Create a new figure manager instance
        """
        _focus = windowing.FocusManager()
        FigureClass = kwargs.pop('FigureClass', Figure)
        figure = FigureClass(*args, **kwargs)
       window = Tk.Tk()

[/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py:90]


    def __init__(self, screenName=None, baseName=None, className='Tk',
                 useTk=1, sync=0, use=None):
        """Return a new Toplevel widget on screen SCREENNAME. A new Tcl
interpreter will
            be created. BASENAME will be used for the identification of
the profile file (see
            readprofile).
            It is constructed from sys.argv[0] without extensions if None
is given. CLASSNAME
            is the name of the widget class."""
        self.master = None
        self.children = {}
        self._tkloaded = 0
        # to avoid recursions in the getattr code in case of failure, we
        # ensure that self.tk is always _something_.
        self.tk = None
        if baseName is None:
            import sys, os
            baseName = os.path.basename(sys.argv[0])
            baseName, ext = os.path.splitext(baseName)
            if ext not in ('.py', '.pyc', '.pyo'):
                baseName = baseName + ext
        interactive = 0
E       self.tk = _tkinter.create(screenName, baseName, className,
interactive, wantobjects, useTk, sync, use)
       TclError: no display name and no $DISPLAY environment variable

[/usr/lib/python2.6/lib-tk/Tkinter.py:1646]

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to