Ticket #6343: trac_6343-reviewer-nt.patch

File trac_6343-reviewer-nt.patch, 1.7 KB (added by nthiery, 10 years ago)
  • sage/misc/sage_unittest.py

    # HG changeset patch
    # User Nicolas M. Thiery <nthiery@users.sf.net>
    # Date 1248131271 -7200
    # Node ID 99c3ea6b80d7b1ee06a9a21a3b68376e1977a277
    # Parent  11f3ef32cb8a5049a9bfea20bc9cef1d5618132d
    imported patch trac_6343-reviewer-nt.patch
    
    diff --git a/sage/misc/sage_unittest.py b/sage/misc/sage_unittest.py
    a b class TestSuite(object): 
    8181       test method to choose appropriately the elements so as to
    8282       prove the desired property. The test method may assume that
    8383       a parent implements properly all the super categories. For
    84        example, the ``test_commutative`` method of the category
     84       example, the ``_test_commutative`` method of the category
    8585       ``CommutativeSemigroups()`` may just check that the
    8686       provided generators commute, implicitly assuming that
    8787       generators indeed generate the semigroup (as required by
  • sage/structure/sage_object.pyx

    diff --git a/sage/structure/sage_object.pyx b/sage/structure/sage_object.pyx
    a b cdef class SageObject: 
    263263        """
    264264        Checks that this object can be pickled and unpickled properly.
    265265
     266        EXAMPLES::
     267
     268            sage: ZZ._test_pickling()
     269
    266270        SEE ALSO: :func:`dumps` :func:`loads`
    267271
     272        TESTS::
     273
     274            sage: class Bla(SageObject): pass
     275            sage: Bla()._test_pickling()
     276            Traceback (most recent call last):
     277            ...
     278            PicklingError: Can't pickle <class '__main__.Bla'>: attribute lookup __main__.Bla failed
     279
    268280        TODO: for a stronger test, this could send the object to a
    269281        remote Sage session, and get it back.
    270282        """