-
Notifications
You must be signed in to change notification settings - Fork 0
/
5-text_indentation.txt
38 lines (34 loc) · 1.13 KB
/
5-text_indentation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Doctest for ``5-text_indentation.txt``
First import:
>>> text_indentation = __import__('5-text_indentation').text_indentation
Check with text1:
>>> text_indentation("""Lorem ipsum dolor sit amet, consectetur adipiscing elit. \
... Quonam modo? Utrum igitur tibi litteram videor an totas paginas commovere? \
... Non autem hoc:igitur ne illud quidem. Fortasse id optimum, sed ubi illud:\
... Plus semper voluptatis? Teneo, inquit, finem illi videri nihil dolere.""")
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<BLANKLINE>
Quonam modo?
<BLANKLINE>
Utrum igitur tibi litteram videor an totas paginas commovere?
<BLANKLINE>
Non autem hoc:
<BLANKLINE>
igitur ne illud quidem.
<BLANKLINE>
Fortasse id optimum, sed ubi illud:
<BLANKLINE>
Plus semper voluptatis?
<BLANKLINE>
Teneo, inquit, finem illi videri nihil dolere.
<BLANKLINE>
Check with integer input:
>>> text_indentation(3)
Traceback (most recent call last):
...
TypeError: text must be a string
Check with no input:
>>> text_indentation()
Traceback (most recent call last):
...
TypeError: text_indentation() missing 1 required positional argument: 'text'