Ticket #13031: 13031-doctest-fix.patch

File 13031-doctest-fix.patch, 1.9 KB (added by robertwb, 7 years ago)
  • sage/misc/dev_tools.py

    # HG changeset patch
    # User Robert Bradshaw <robertwb@math.washington.edu>
    # Date 1363501899 25200
    # Node ID 3a4876788f977731f2acfef334670cd1089875df
    # Parent  508a261e91f7305109608436ca9a1fb3c73267da
    Fix doctest sensitive to dict ordering.
    
    diff --git a/sage/misc/dev_tools.py b/sage/misc/dev_tools.py
    a b  
    143143        from sage.rings.semirings.non_negative_integer_semiring import NN
    144144
    145145        sage: import_statements(ZZ)
    146           ** Warning **: several names for that object: ZZ, Z
    147         from sage.rings.integer_ring import ZZ
     146          ** Warning **: several names for that object: Z, ZZ
     147        from sage.rings.integer_ring import Z
    148148
    149149        sage: import_statements(euler_phi)
    150150        from sage.rings.arith import euler_phi
     
    156156    If you don't like the warning you can disable them with the option ``verbose``::
    157157
    158158        sage: import_statements(ZZ, verbose=False)
    159         from sage.rings.integer_ring import ZZ
     159        from sage.rings.integer_ring import Z
    160160
    161161        sage: import_statements(x, verbose=False)
    162162        from sage.calculus.predefined import x
     
    242242        if module:
    243243            d = sys.modules[module].__dict__
    244244            if name is None:
    245                 names = [key for key in d if d[key] is obj]
     245                names = sorted(key for key in d if d[key] is obj)
    246246            else:
    247247                names = [name]
    248248            if names:
  • sage/schemes/generic/notes/divisor_stein-joyner.txt

    diff --git a/sage/schemes/generic/notes/divisor_stein-joyner.txt b/sage/schemes/generic/notes/divisor_stein-joyner.txt
    a b  
    3737
    3838from sage.groups.group import AbelianGroup
    3939
    40 from sage.rings.all import Z
     40from sage.rings.all import ZZ as Z
    4141
    4242class Divisor_generic(FormalSum):
    4343    def scheme(self):