Skip to content

Commit 85427c4

Browse files
author
Matthias Koeppe
committed
sage.structure: Update # needs
1 parent 9ffc65d commit 85427c4

File tree

5 files changed

+28
-24
lines changed

5 files changed

+28
-24
lines changed

src/sage/structure/coerce_actions.pyx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,16 +782,18 @@ cdef class IntegerMulAction(IntegerAction):
782782
783783
Check that large multiplications can be interrupted::
784784
785-
sage: alarm(0.001); 2^(10^7) * P # needs sage.schemes
785+
sage: # needs sage.schemes
786+
sage: alarm(0.001); 2^(10^7) * P
786787
Traceback (most recent call last):
787788
...
788789
AlarmInterrupt
789790
790791
Verify that cysignals correctly detects that the above
791792
exception has been handled::
792793
794+
sage: # needs sage.schemes
793795
sage: from cysignals.tests import print_sig_occurred
794-
sage: print_sig_occurred() # needs sage.schemes
796+
sage: print_sig_occurred()
795797
No current exception
796798
"""
797799
cdef int err = 0

src/sage/structure/factorization.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,9 +1231,9 @@ def __call__(self, *args, **kwds):
12311231
sage: F(t=0)
12321232
0
12331233
1234-
sage: R.<x> = LaurentPolynomialRing(QQ, 1)
1235-
sage: F = ((x+2)/x**3).factor()
1236-
sage: F(x=4)
1234+
sage: R.<x> = LaurentPolynomialRing(QQ, 1) # needs sage.modules
1235+
sage: F = ((x+2)/x**3).factor() # needs sage.modules
1236+
sage: F(x=4) # needs sage.modules
12371237
1/64 * 6
12381238
"""
12391239
unit = self.__unit.subs(*args, **kwds)

src/sage/structure/parent.pyx

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,54 +1083,56 @@ cdef class Parent(sage.structure.category_object.CategoryObject):
10831083
True
10841084
sage: 5 in QQ
10851085
True
1086-
sage: I in RR # needs sage.rings.real_mpfr
1086+
sage: I in RR # needs sage.rings.real_mpfr sage.symbolic
10871087
False
1088-
sage: SR(2) in ZZ # needs sage.symbolic
1088+
sage: RIF(1, 2) in RIF # needs sage.rings.real_interval_field
10891089
True
1090-
sage: RIF(1, 2) in RIF
1090+
1091+
sage: # needs sage.symbolic
1092+
sage: SR(2) in ZZ
10911093
True
1092-
sage: pi in RIF # there is no element of RIF equal to pi # needs sage.symbolic
1094+
sage: pi in RIF # there is no element of RIF equal to pi
10931095
False
1094-
sage: sqrt(2) in CC # needs sage.symbolic
1096+
sage: sqrt(2) in CC
10951097
True
1096-
sage: pi in RR # needs sage.symbolic
1098+
sage: pi in RR
10971099
True
1098-
sage: pi in CC # needs sage.symbolic
1100+
sage: pi in CC
10991101
True
1100-
sage: pi in RDF # needs sage.symbolic
1102+
sage: pi in RDF
11011103
True
1102-
sage: pi in CDF # needs sage.symbolic
1104+
sage: pi in CDF
11031105
True
11041106
11051107
Note that we have
11061108
11071109
::
11081110
1109-
sage: 3/2 in RIF
1111+
sage: 3/2 in RIF # needs sage.rings.real_interval_field
11101112
True
11111113
11121114
because ``3/2`` has an exact representation in ``RIF`` (i.e. can be
11131115
represented as an interval that contains exactly one value)::
11141116
1115-
sage: RIF(3/2).is_exact()
1117+
sage: RIF(3/2).is_exact() # needs sage.rings.real_interval_field
11161118
True
11171119
11181120
On the other hand, we have
11191121
11201122
::
11211123
1122-
sage: 2/3 in RIF
1124+
sage: 2/3 in RIF # needs sage.rings.real_interval_field
11231125
False
11241126
11251127
because ``2/3`` has no exact representation in ``RIF``. Since
11261128
``RIF(2/3)`` is a nontrivial interval, it cannot be equal to anything
11271129
(not even itself)::
11281130
1129-
sage: RIF(2/3).is_exact()
1131+
sage: RIF(2/3).is_exact() # needs sage.rings.real_interval_field
11301132
False
1131-
sage: RIF(2/3).endpoints()
1133+
sage: RIF(2/3).endpoints() # needs sage.rings.real_interval_field
11321134
(0.666666666666666, 0.666666666666667)
1133-
sage: RIF(2/3) == RIF(2/3)
1135+
sage: RIF(2/3) == RIF(2/3) # needs sage.rings.real_interval_field
11341136
False
11351137
11361138
TESTS:

src/sage/structure/sequence.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
special parent. This is what should happen, e.g., with finite field
4646
elements of different characteristics::
4747
48-
sage: v = Sequence([GF(3)(1), GF(7)(1)]) # needs sage.rings.finite_rings
49-
sage: v.universe() # needs sage.rings.finite_rings
48+
sage: v = Sequence([GF(3)(1), GF(7)(1)])
49+
sage: v.universe()
5050
Category of objects
5151
5252
You can make a list immutable with ``v.freeze()``. Assignment is

src/sage/structure/unique_representation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ class will by default also be used as keys for the cache::
112112
when comparing elements of *distinct* algebraic structures!!). Hence, we
113113
have::
114114
115-
sage: GF(5)(2) == GF(3)(2) # needs sage.rings.finite_rings
115+
sage: GF(5)(2) == GF(3)(2)
116116
False
117-
sage: C(GF(3)(2)) is C(GF(5)(2)) # needs sage.rings.finite_rings
117+
sage: C(GF(3)(2)) is C(GF(5)(2))
118118
False
119119
120120
Normalising the arguments

0 commit comments

Comments
 (0)