summaryrefslogtreecommitdiffstats
path: root/src/sage/structure/sage_object.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'src/sage/structure/sage_object.pyx')
-rw-r--r--src/sage/structure/sage_object.pyx65
1 files changed, 55 insertions, 10 deletions
diff --git a/src/sage/structure/sage_object.pyx b/src/sage/structure/sage_object.pyx
index bb62a4a..b98e3a6 100644
--- a/src/sage/structure/sage_object.pyx
+++ b/src/sage/structure/sage_object.pyx
@@ -2,6 +2,49 @@
# cython: old_style_globals=True
r"""
Abstract base class for Sage objects
+
+TESTS:
+
+Test deprecations::
+
+ sage: from sage.structure.sage_object import (
+ ....: richcmp, richcmp_not_equal,
+ ....: rich_to_bool, py_rich_to_bool, rich_to_bool_sgn,
+ ....: op_EQ, op_NE, op_LT, op_LE, op_GT, op_GE)
+ sage: richcmp(2, 3, op_EQ)
+ doctest:...: DeprecationWarning: Importing richcmp from here is deprecated. If you need to use it, please import it directly from sage.structure.richcmp
+ See http://trac.sagemath.org/23103 for details.
+ doctest:...: DeprecationWarning: Importing op_EQ from here is deprecated. If you need to use it, please import it directly from sage.structure.richcmp
+ See http://trac.sagemath.org/23103 for details.
+ False
+ sage: richcmp_not_equal(2, 3, op_LT)
+ doctest:...: DeprecationWarning: Importing richcmp_not_equal from here is deprecated. If you need to use it, please import it directly from sage.structure.richcmp
+ See http://trac.sagemath.org/23103 for details.
+ doctest:...: DeprecationWarning: Importing op_LT from here is deprecated. If you need to use it, please import it directly from sage.structure.richcmp
+ See http://trac.sagemath.org/23103 for details.
+ True
+ sage: rich_to_bool(op_NE, 0)
+ doctest:...: DeprecationWarning: Importing rich_to_bool from here is deprecated. If you need to use it, please import it directly from sage.structure.richcmp
+ See http://trac.sagemath.org/23103 for details.
+ doctest:...: DeprecationWarning: Importing op_NE from here is deprecated. If you need to use it, please import it directly from sage.structure.richcmp
+ See http://trac.sagemath.org/23103 for details.
+ False