# HG changeset patch
# User Nicolas M. Thiery
# 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/sage/misc/sage_unittest.py
+++ b/sage/misc/sage_unittest.py
@@ -81,7 +81,7 @@ class TestSuite(object):
test method to choose appropriately the elements so as to
prove the desired property. The test method may assume that
a parent implements properly all the super categories. For
- example, the ``test_commutative`` method of the category
+ example, the ``_test_commutative`` method of the category
``CommutativeSemigroups()`` may just check that the
provided generators commute, implicitly assuming that
generators indeed generate the semigroup (as required by
diff --git a/sage/structure/sage_object.pyx b/sage/structure/sage_object.pyx
--- a/sage/structure/sage_object.pyx
+++ b/sage/structure/sage_object.pyx
@@ -263,8 +263,20 @@ cdef class SageObject:
"""
Checks that this object can be pickled and unpickled properly.
+ EXAMPLES::
+
+ sage: ZZ._test_pickling()
+
SEE ALSO: :func:`dumps` :func:`loads`
+ TESTS::
+
+ sage: class Bla(SageObject): pass
+ sage: Bla()._test_pickling()
+ Traceback (most recent call last):
+ ...
+ PicklingError: Can't pickle : attribute lookup __main__.Bla failed
+
TODO: for a stronger test, this could send the object to a
remote Sage session, and get it back.
"""