Ticket #14832: trac_14832-doctest.patch

File trac_14832-doctest.patch, 1.3 KB (added by pbruin, 10 years ago)

add doctest

  • sage/rings/polynomial/polynomial_ring.py

    # HG changeset patch
    # User Peter Bruin <peter.bruin@math.uzh.ch>
    # Date 1374070246 -7200
    # Node ID 040f8884c9680beede5f8ee5541855a683447aab
    # Parent  b588bbbce03b83a765915113c01d502adf962345
    Trac 14832: add doctest
    
    diff --git a/sage/rings/polynomial/polynomial_ring.py b/sage/rings/polynomial/polynomial_ring.py
    a b  
    17961796        <class 'sage.rings.polynomial.polynomial_ring.PolynomialRing_dense_finite_field_with_category'>
    17971797    """
    17981798    def __init__(self, base_ring, name="x", element_class=None, implementation=None):
     1799        """
     1800        TESTS::
     1801
     1802            sage: from sage.rings.polynomial.polynomial_ring import PolynomialRing_dense_finite_field
     1803            sage: R = PolynomialRing_dense_finite_field(GF(5), implementation='generic')
     1804            sage: type(R(0))
     1805            <class 'sage.rings.polynomial.polynomial_element_generic.Polynomial_generic_dense_field'>
     1806
     1807            sage: S = PolynomialRing_dense_finite_field(GF(25, 'a'), implementation='NTL')
     1808            sage: type(S(0))
     1809            <type 'sage.rings.polynomial.polynomial_zz_pex.Polynomial_ZZ_pEX'>
     1810        """
    17991811        if implementation is None:
    18001812            implementation = "NTL"
    18011813