Skip to content

Commit 7b7f4e4

Browse files
author
Matthias Koeppe
committed
Update # needs
1 parent 333cf2c commit 7b7f4e4

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

src/sage/typeset/character_art_factory.py

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ def build(self, obj, baseline=None):
8484
8585
EXAMPLES::
8686
87-
sage: result = ascii_art(integral(exp(x+x^2)/(x+1), x)) # optional - sage.symbolic
87+
sage: result = ascii_art(integral(exp(x+x^2)/(x+1), x)) # needs sage.symbolic
8888
...
89-
sage: result # optional - sage.symbolic
89+
sage: result # needs sage.symbolic
9090
/
9191
|
9292
| 2
@@ -99,14 +99,14 @@ def build(self, obj, baseline=None):
9999
100100
TESTS::
101101
102-
sage: n = var('n') # optional - sage.symbolic
103-
sage: ascii_art(sum(binomial(2 * n, n + 1) * x^n, n, 0, oo)) # optional - sage.symbolic
102+
sage: n = var('n') # needs sage.symbolic
103+
sage: ascii_art(sum(binomial(2 * n, n + 1) * x^n, n, 0, oo)) # needs sage.symbolic
104104
/ _________ \
105105
-\2*x + \/ 1 - 4*x - 1/
106106
-------------------------
107107
_________
108108
2*x*\/ 1 - 4*x
109-
sage: ascii_art(list(DyckWords(3))) # optional - sage.combinat
109+
sage: ascii_art(list(DyckWords(3))) # needs sage.combinat
110110
[ /\ ]
111111
[ /\ /\ /\/\ / \ ]
112112
[ /\/\/\, /\/ \, / \/\, / \, / \ ]
@@ -161,10 +161,10 @@ def build_from_magic_method(self, obj, baseline=None):
161161
EXAMPLES::
162162
163163
sage: from sage.typeset.ascii_art import _ascii_art_factory as factory
164-
sage: out = factory.build_from_magic_method(identity_matrix(2)); out # optional - sage.modules
164+
sage: out = factory.build_from_magic_method(identity_matrix(2)); out # needs sage.modules
165165
[1 0]
166166
[0 1]
167-
sage: type(out) # optional - sage.modules
167+
sage: type(out) # needs sage.modules
168168
<class 'sage.typeset.ascii_art.AsciiArt'>
169169
"""
170170
magic_method = getattr(obj, self.magic_method_name)
@@ -243,12 +243,12 @@ def build_container(self, content, left_border, right_border, baseline=0):
243243
244244
TESTS::
245245
246-
sage: l = ascii_art(list(DyckWords(3))) # indirect doctest # optional - sage.combinat
247-
sage: l # optional - sage.combinat
246+
sage: l = ascii_art(list(DyckWords(3))) # indirect doctest # needs sage.combinat
247+
sage: l # needs sage.combinat
248248
[ /\ ]
249249
[ /\ /\ /\/\ / \ ]
250250
[ /\/\/\, /\/ \, / \/\, / \, / \ ]
251-
sage: l._breakpoints # optional - sage.combinat
251+
sage: l._breakpoints # needs sage.combinat
252252
[9, 17, 25, 33]
253253
254254
Check that zero-height strings are handled (:trac:`28527`)::
@@ -289,7 +289,7 @@ def build_set(self, s, baseline=0):
289289
iteration over sets is non-deterministic so too is the results of this
290290
test::
291291
292-
sage: ascii_art(set(DyckWords(3))) # indirect doctest random # optional - sage.combinat
292+
sage: ascii_art(set(DyckWords(3))) # indirect doctest random # needs sage.combinat
293293
{ /\ }
294294
{ /\ /\/\ /\ / \ }
295295
{ / \/\, / \, /\/\/\, /\/ \, / \ }
@@ -298,7 +298,7 @@ def build_set(self, s, baseline=0):
298298
a set, but still obtain the same output formatting::
299299
300300
sage: from sage.typeset.ascii_art import _ascii_art_factory as factory
301-
sage: factory.build_set(sorted(set(DyckWords(3)))) # optional - sage.combinat
301+
sage: factory.build_set(sorted(set(DyckWords(3)))) # needs sage.combinat
302302
{ /\ }
303303
{ /\ /\ /\/\ / \ }
304304
{ /\/\/\, /\/ \, / \/\, / \, / \ }
@@ -315,14 +315,15 @@ def build_dict(self, d, baseline=0):
315315
316316
TESTS::
317317
318+
sage: # needs sage.combinat
318319
sage: from collections import OrderedDict
319-
sage: d = OrderedDict(enumerate(DyckWords(3))) # optional - sage.combinat
320-
sage: art = ascii_art(d) # indirect doctest # optional - sage.combinat
321-
sage: art # optional - sage.combinat
320+
sage: d = OrderedDict(enumerate(DyckWords(3)))
321+
sage: art = ascii_art(d) # indirect doctest
322+
sage: art
322323
{ /\ }
323324
{ /\ /\ /\/\ / \ }
324325
{ 0:/\/\/\, 1:/\/ \, 2:/ \/\, 3:/ \, 4:/ \ }
325-
sage: art._breakpoints # optional - sage.combinat
326+
sage: art._breakpoints
326327
[11, 21, 31, 41]
327328
328329
Check that :trac:`29447` is fixed::
@@ -357,18 +358,18 @@ def build_list(self, l, baseline=0):
357358
358359
TESTS::
359360
360-
sage: l = ascii_art(list(DyckWords(3))) # indirect doctest # optional - sage.combinat
361-
sage: l # optional - sage.combinat
361+
sage: l = ascii_art(list(DyckWords(3))) # indirect doctest # needs sage.combinat
362+
sage: l # needs sage.combinat
362363
[ /\ ]
363364
[ /\ /\ /\/\ / \ ]
364365
[ /\/\/\, /\/ \, / \/\, / \, / \ ]
365-
sage: l._breakpoints # optional - sage.combinat
366+
sage: l._breakpoints # needs sage.combinat
366367
[9, 17, 25, 33]
367368
368369
The breakpoints of the object are used as breakpoints::
369370
370-
sage: l = ascii_art([DyckWords(2).list(), DyckWords(2).list()]) # optional - sage.combinat
371-
sage: l._breakpoints # optional - sage.combinat
371+
sage: l = ascii_art([DyckWords(2).list(), DyckWords(2).list()]) # needs sage.combinat
372+
sage: l._breakpoints # needs sage.combinat
372373
[(2, [7]), 17, (18, [7])]
373374
374375
The parentheses only stretch as high as the content (:trac:`28527`)::
@@ -399,7 +400,7 @@ def build_tuple(self, t, baseline=0):
399400
400401
TESTS::
401402
402-
sage: ascii_art(tuple(DyckWords(3))) # indirect doctest # optional - sage.combinat
403+
sage: ascii_art(tuple(DyckWords(3))) # indirect doctest # needs sage.combinat
403404
( /\ )
404405
( /\ /\ /\/\ / \ )
405406
( /\/\/\, /\/ \, / \/\, / \, / \ )
@@ -440,8 +441,8 @@ def concatenate(self, iterable, separator, empty=None, baseline=0,
440441
441442
EXAMPLES::
442443
443-
sage: i2 = identity_matrix(2) # optional - sage.modules
444-
sage: ascii_art(i2, i2, i2, sep=ascii_art(1/x)) # optional - sage.modules sage.symbolic
444+
sage: i2 = identity_matrix(2) # needs sage.modules
445+
sage: ascii_art(i2, i2, i2, sep=ascii_art(1/x)) # needs sage.modules sage.symbolic
445446
1 1
446447
[1 0]-[1 0]-[1 0]
447448
[0 1]x[0 1]x[0 1]

0 commit comments

Comments
 (0)