Ticket #12142: trac_12142-doctest.patch

File trac_12142-doctest.patch, 1.1 KB (added by pbruin, 10 years ago)

add doctest

  • sage/rings/finite_rings/element_pari_ffelt.pyx

    # HG changeset patch
    # User Peter Bruin <peter.bruin@math.uzh.ch>
    # Date 1374073708 -7200
    # Node ID e8c4f5469d1ce18ee5c1f189503825b96ef3b378
    # Parent  631c95f3757bee48e228d0052041342f9230c1ba
    Trac 12142: add doctest
    
    diff --git a/sage/rings/finite_rings/element_pari_ffelt.pyx b/sage/rings/finite_rings/element_pari_ffelt.pyx
    a b  
    131131        Create an empty finite field element with the given parent.
    132132
    133133        This is called when constructing elements from Python.
     134
     135        TEST::
     136
     137            sage: from sage.rings.finite_rings.element_pari_ffelt import FiniteFieldElement_pari_ffelt
     138            sage: K = FiniteField(101^2, 'a', impl='pari_ffelt')
     139            sage: x = FiniteFieldElement_pari_ffelt(K, 'a + 1')
     140            sage: x
     141            a + 1
    134142        """
    135143        # FinitePolyExtElement.__init__(self, parent)
    136144        self._parent = parent
     
    336344        """
    337345        For pickling.
    338346
    339         TEST:
     347        TEST::
    340348
    341349            sage: K = FiniteField(10007^10, 'a', impl='pari_ffelt')
    342350            sage: a = K.gen()