I had these failures in 'make ptestlong' after building from source on ubuntu:

sage -t --long src/sage/structure/sage_object.pyx  # 1 doctest failed
sage -t --long src/sage/repl/display/formatter.py  # 1 doctest failed
sage -t --long src/sage/repl/attach.py  # 1 doctest failed
sage -t --long src/sage/repl/inputhook.pyx  # 1 doctest failed
sage -t --long src/sage/repl/interface_magic.py  # 1 doctest failed
sage -t --long src/sage/repl/ipython_tests.py  # 1 doctest failed
sage -t --long src/sage/repl/interpreter.py  # 2 doctests failed
sage -t --long src/sage/repl/ipython_extension.py  # 1 doctest failed
sage -t --long src/sage/repl/rich_output/backend_ipython.py  # 1 doctest failed
sage -t --long src/sage/typeset/ascii_art.py  # 1 doctest failed

all of which were caused by my having a print statememt in
~/.sage/init.sage on that machine.  OK so that is my fault, but would
it not be better for testing to *not* read the startup file (by
default)?

John

On 3 August 2016 at 22:44, leif <[email protected]> wrote:
> leif wrote:
>> Daniel Krenn wrote:
>>> On 2016-07-28 23:39, Volker Braun wrote:
>>>> As always, you can get the latest beta version from the "develop" git
>>>> branch. Alternatively, the self-contained source tarball is at
>>>> http://www.sagemath.org/download-latest.html
>>>
>>> Compiling and testing 7.3.rc0 with "make -j4 ptestlong" showed one
>>> failing doctest:
>>>
>>> File "src/sage/libs/gap/assigned_names.py", line 59, in
>>> sage.libs.gap.assigned_names.load_or_compute
>>> Failed example:
>>>     workspace(name='globals')
>>> Expected:
>>>     ('...', True)
>>> Got:
>>>     ('/home/sci/dakrenn/.sage/gap/libgap-globals-8457726060030361270',
>>> False)
>>>
>>>
>>> However, testing this again was successful.
>>
>> This test *always* fails for me in ptestlong (since quite a while),
>> passes when rerun separately.
>>
>>
>>> Ideas what the problem could
>>> have been?
>>
>> No idea, but if you delete the GAP workspaces (in $DOT_SAGE/gap/), the
>> test takes orders of magnitude longer... :-)
>
> FWIW, IMHO the doctest doesn't belong there anyway, and is likely to
> fail when building Sage.  The tested function is in
> src/sage/libs/gap/saved_workspace.py and looks like this:
>
> def workspace(name='workspace'):
>     """
>     Return the filename of the gap workspace and whether it is up to date.
>
>     INPUT:
>
>     - ``name`` -- string. A name that will become part of the
>       workspace filename.
>
>     OUTPUT:
>
>     Pair consisting of a string and a boolean. The string is the
>     filename of the saved libgap workspace (or that it should have if
>     it doesn't exist). The boolean is whether the workspace is
>     up-to-date. You may use the workspace file only if the boolean is
>     ``True``.
>
>     EXAMPLES::
>
>         sage: from sage.libs.gap.saved_workspace import workspace
>         sage: ws, up_to_date = workspace()
>         sage: ws
>         '/.../gap/libgap-workspace-...'
>         sage: isinstance(up_to_date, bool)
>         True
>     """
>     import os
>     import glob
>     from sage.env import SAGE_LOCAL, DOT_SAGE
>     workspace = os.path.join(DOT_SAGE, 'gap', 'libgap-{0}-{1}'
>                         .format(name, abs(hash(SAGE_LOCAL))))
>     try:
>         workspace_mtime = os.path.getmtime(workspace)
>     except OSError:
>         # workspace does not exist
>         return (workspace, False)
>     return (workspace, workspace_mtime > timestamp())
>
>
> So it's not surprising it regularly fails.
>
>
> timestamp() is defined above the function, in the same file:
>
> def timestamp():
>     # <SNIP>
>     libgap_dir = os.path.dirname(__file__)
>     files = glob.glob(os.path.join(libgap_dir, '*'))
>     if len(files) == 0:
>         print('Unable to find LibGAP files.')
>         return float('inf')
>     return max(map(os.path.getmtime, files))
>
> (It returns the most recent modification time of *all* files in
> ${SAGE_LOCAL}/lib/python2.7/site-packages/sage/libs/gap/ -- including
> '*.pyc' files(!), or infty in case of an unlikely error.)
>
>
> -leif
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-release" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sage-release.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-release" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-release.
For more options, visit https://groups.google.com/d/optout.

Reply via email to