Skip to content

Commit b707b29

Browse files
author
Release Manager
committed
gh-36657: `sage.tests`: Update `# needs` <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> Cherry-picked from #35095. <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36657 Reported by: Matthias Köppe Reviewer(s): David Coudert, Matthias Köppe
2 parents 34b6321 + 7133182 commit b707b29

25 files changed

+196
-144
lines changed

src/sage/doctest/fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ def reproducible_repr(val):
8080
frozenset(['a', 'b', 'c', 'd'])
8181
sage: print(reproducible_repr([1, frozenset("cab"), set("bar"), 0]))
8282
[1, frozenset(['a', 'b', 'c']), set(['a', 'b', 'r']), 0]
83-
sage: print(reproducible_repr({3.0:"three","2":"two",1:"one"}))
83+
sage: print(reproducible_repr({3.0: "three", "2": "two", 1: "one"})) # optional - sage.rings.real_mpfr
8484
{'2': 'two', 1: 'one', 3.00000000000000: 'three'}
85-
sage: print(reproducible_repr("foo\nbar")) # demonstrate default case
85+
sage: print(reproducible_repr("foo\nbar")) # demonstrate default case
8686
'foo\nbar'
8787
"""
8888

src/sage/ext/fast_callable.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@ class IntegerPowerFunction():
16451645
pi^2
16461646
sage: square(I) # needs sage.symbolic
16471647
-1
1648-
sage: square(RIF(-1, 1)).str(style='brackets')
1648+
sage: square(RIF(-1, 1)).str(style='brackets') # needs sage.rings.real_interval_field
16491649
'[0.0000000000000000 .. 1.0000000000000000]'
16501650
sage: IntegerPowerFunction(-1)
16511651
(^(-1))

src/sage/libs/coxeter3/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# sage_setup: distribution = sagemath-coxeter3
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# sage_setup: distribution = sagemath-coxeter3

src/sage/structure/coerce.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,8 @@ cdef class CoercionModel:
517517
Check that :trac:`8426` is fixed (see also :trac:`18076`)::
518518
519519
sage: import numpy # needs numpy
520+
521+
sage: # needs sage.rings.real_mpfr
520522
sage: x = polygen(RR)
521523
sage: numpy.float32('1.5') * x # needs numpy
522524
1.50000000000000*x

src/sage/structure/factorization.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,9 +1232,10 @@ def __call__(self, *args, **kwds):
12321232
sage: F(t=0)
12331233
0
12341234
1235-
sage: R.<x> = LaurentPolynomialRing(QQ, 1) # needs sage.modules
1236-
sage: F = ((x+2)/x**3).factor() # needs sage.modules
1237-
sage: F(x=4) # needs sage.modules
1235+
sage: # needs sage.libs.pari sage.modules
1236+
sage: R.<x> = LaurentPolynomialRing(QQ, 1)
1237+
sage: F = ((x+2)/x**3).factor()
1238+
sage: F(x=4)
12381239
1/64 * 6
12391240
"""
12401241
unit = self.__unit.subs(*args, **kwds)

src/sage/structure/parent_old.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ cdef class Parent(parent.Parent):
5252
[(0, 0), (1, 0), (0, 1), (1, 1)]
5353
sage: MatrixSpace(GF(3), 1, 1).list()
5454
[[0], [1], [2]]
55-
sage: DirichletGroup(3).list() # needs sage.modular
55+
sage: DirichletGroup(3).list() # needs sage.libs.pari sage.modular
5656
[Dirichlet character modulo 3 of conductor 1 mapping 2 |--> 1,
5757
Dirichlet character modulo 3 of conductor 3 mapping 2 |--> -1]
5858

src/sage/symbolic/function.pyx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,10 +642,11 @@ cdef class Function(SageObject):
642642
sage: hurwitz_zeta(1/2, b)
643643
hurwitz_zeta(1/2, [1.500000000 +/- 1.01e-10])
644644
645-
sage: iv = RIF(1, 1.0001)
646-
sage: airy_ai(iv)
645+
sage: iv = RIF(1, 1.0001) # needs sage.rings.real_interval_field
646+
647+
sage: airy_ai(iv) # needs sage.rings.real_interval_field
647648
airy_ai(1.0001?)
648-
sage: airy_ai(CIF(iv))
649+
sage: airy_ai(CIF(iv)) # needs sage.rings.complex_interval_field
649650
airy_ai(1.0001?)
650651
"""
651652
if isinstance(x, (float, complex)):

src/sage/tests/article_heuberger_krenn_kropf_fsm-in-sage.py

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# sage.doctest: needs sage.graphs sage.modules
12
r"""
23
This file contains doctests of the article ::
34
@@ -505,11 +506,11 @@
505506
506507
Sage example in fsm-in-sage.tex, line 1091::
507508
508-
sage: var('y')
509+
sage: var('y') # needs sage.symbolic
509510
y
510511
sage: def am_entry(trans):
511512
....: return y^add(trans.word_out) / 2
512-
sage: A = W.adjacency_matrix(entry=am_entry)
513+
sage: A = W.adjacency_matrix(entry=am_entry) # needs sage.symbolic
513514
514515
515516
Sage example in fsm-in-sage.tex, line 1097::
@@ -519,7 +520,7 @@
519520
520521
Sage example in fsm-in-sage.tex, line 1099::
521522
522-
sage: latex(A)
523+
sage: latex(A) # needs sage.symbolic
523524
\left(\begin{array}{ccccccccc}
524525
\frac{1}{2} & \frac{1}{2} \, y^{2} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
525526
0 & 0 & \frac{1}{2} & \frac{1}{2} & 0 & 0 & 0 & 0 & 0 \\
@@ -535,95 +536,95 @@
535536
536537
Sage example in fsm-in-sage.tex, line 1109::
537538
538-
sage: (pi_not_normalized,) = (A.subs(y=1) - A.parent().identity_matrix())\
539-
....: .left_kernel().basis()
540-
sage: pi = pi_not_normalized / pi_not_normalized.norm(p=1)
539+
sage: A1mI = (A.subs(y=1) - A.parent().identity_matrix()) # needs sage.symbolic
540+
sage: (pi_not_normalized,) = A1mI.left_kernel().basis() # needs sage.symbolic
541+
sage: pi = pi_not_normalized / pi_not_normalized.norm(p=1) # needs sage.symbolic
541542
542543
543544
Sage example in fsm-in-sage.tex, line 1110::
544545
545-
sage: str(pi)
546+
sage: str(pi) # needs sage.symbolic
546547
'(1/9, 1/9, 1/9, 1/9, 1/9, 1/9, 1/9, 1/9, 1/9)'
547548
548549
549550
Sage example in fsm-in-sage.tex, line 1117::
550551
551-
sage: expected_output = derivative(A, y).subs(y=1) * vector(len(W.states())*[1])
552+
sage: expected_output = derivative(A, y).subs(y=1) * vector(len(W.states())*[1]) # needs sage.symbolic
552553
553554
554555
Sage example in fsm-in-sage.tex, line 1118::
555556
556-
sage: latex(expected_output)
557+
sage: latex(expected_output) # needs sage.symbolic
557558
\left(1,\,0,\,0,\,0,\,\frac{1}{2},\,1,\,1,\,\frac{1}{2},\,1\right)
558559
559560
560561
Sage example in fsm-in-sage.tex, line 1126::
561562
562-
sage: pi * expected_output
563+
sage: pi * expected_output # needs sage.symbolic
563564
5/9
564565
565566
566567
Sage example in fsm-in-sage.tex, line 1127::
567568
568-
sage: latex(pi * expected_output)
569+
sage: latex(pi * expected_output) # needs sage.symbolic
569570
\frac{5}{9}
570571
571572
572573
Sage example in fsm-in-sage.tex, line 1129::
573574
574-
sage: latex(pi * expected_output)
575+
sage: latex(pi * expected_output) # needs sage.symbolic
575576
\frac{5}{9}
576577
577578
578579
Sage example in fsm-in-sage.tex, line 1145::
579580
580-
sage: var('k')
581+
sage: var('k') # needs sage.symbolic
581582
k
582-
sage: moments = W.asymptotic_moments(k)
583+
sage: moments = W.asymptotic_moments(k) # needs sage.symbolic
583584
584585
585586
Sage example in fsm-in-sage.tex, line 1155::
586587
587-
sage: latex(moments['expectation'])
588+
sage: latex(moments['expectation']) # needs sage.symbolic
588589
\frac{5}{9} \, k + \mathcal{O}\left(1\right)
589590
590591
591592
Sage example in fsm-in-sage.tex, line 1162::
592593
593-
sage: latex(moments['variance'])
594+
sage: latex(moments['variance']) # needs sage.symbolic
594595
\frac{44}{243} \, k + \mathcal{O}\left(1\right)
595596
596597
597598
Sage example in fsm-in-sage.tex, line 1192::
598599
599-
sage: expectation_binary = Id.asymptotic_moments(k)['expectation']
600+
sage: expectation_binary = Id.asymptotic_moments(k)['expectation'] # needs sage.symbolic
600601
601602
602603
Sage example in fsm-in-sage.tex, line 1195::
603604
604-
sage: latex(expectation_binary)
605+
sage: latex(expectation_binary) # needs sage.symbolic
605606
\frac{1}{2} \, k + \mathcal{O}\left(1\right)
606607
607608
608609
Sage example in fsm-in-sage.tex, line 1202::
609610
610-
sage: expectation_NAF = Weight(NAF).asymptotic_moments(k)['expectation']
611+
sage: expectation_NAF = Weight(NAF).asymptotic_moments(k)['expectation'] # needs sage.symbolic
611612
612613
613614
Sage example in fsm-in-sage.tex, line 1205::
614615
615-
sage: latex(expectation_NAF)
616+
sage: latex(expectation_NAF) # needs sage.symbolic
616617
\frac{1}{3} \, k + \mathcal{O}\left(1\right)
617618
618619
619620
Sage example in fsm-in-sage.tex, line 1211::
620621
621-
sage: Abs = transducers.abs([-1, 0, 1])
622+
sage: Abs = transducers.abs([-1, 0, 1]) # needs sage.symbolic
622623
623624
624625
Sage example in fsm-in-sage.tex, line 1216::
625626
626-
sage: latex(moments['expectation'])
627+
sage: latex(moments['expectation']) # needs sage.symbolic
627628
\frac{5}{9} \, k + \mathcal{O}\left(1\right)
628629
629630
"""

src/sage/tests/arxiv_0812_2725.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# sage.doctest: needs sage.combinat
12
r"""
23
Sage code for computing k-distant crossing numbers.
34

0 commit comments

Comments
 (0)