Ticket #13361: trac_13361-sagelib-referee.patch

File trac_13361-sagelib-referee.patch, 1.8 KB (added by jhpalmieri, 9 years ago)

Sage library: documentation and doctest fix

  • doc/en/reference/options.rst

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1348075557 25200
    # Node ID 75af17fc673fe4646e8bba48110c3c603494f3ce
    # Parent  862cd6cf71047fa6c1063de4fa3b2346c521f7c6
    Document 'sage --startuptime [module]', fix doctest in tests/startup.py.
    
    diff --git a/doc/en/reference/options.rst b/doc/en/reference/options.rst
    a b for Sage: 
    189189- ``-btnew [...]`` -- build and test modified files, options like ``-tnew``
    190190- ``--fixdoctests file.py`` -- create ``file.py.out`` that would
    191191  pass the doctests and output a patch
    192 - ``--startuptime`` -- display how long each component of Sage takes
    193   to start up
     192- ``--startuptime [module]`` -- display how long each component of Sage takes
     193  to start up. Optionally specify a module (e.g., "sage.rings.qqbar") to get
     194  more details about that particular module.
    194195- ``--coverage <files>`` -- give information about doctest coverage
    195196  of files
    196197- ``--coverageall`` -- give summary info about doctest coverage of
  • sage/tests/startup.py

    diff --git a/sage/tests/startup.py b/sage/tests/startup.py
    a b Test that on sage.math (a fast computer) 
    44a warm cache) has not got out of hand.::
    55
    66    sage: if os.uname()[1] == 'sage.math.washington.edu':
    7     ...     print float(os.popen("sage -startuptime>/dev/null; sage -startuptime|grep sage.all").readlines()[0].split()[1]) < 2.0
     7    ...     startup = float(os.popen("sage --startuptime>/dev/null; sage --startuptime|grep 'Total time'").readlines()[0].split()[-1].rstrip('ms'))/1000
     8    ...     if startup < 2:
     9    ...         print True
     10    ...     else:
     11    ...         print "'sage --startuptime' took %s seconds." % startup
    812    ... else: print True   # nothing when not on sage.math
    913    True
    1014