-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4-print_square.txt
39 lines (29 loc) · 933 Bytes
/
4-print_square.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
39
4-print_square module tests
==========================
`print_square` function tests
--------------------------
>>> print_square = __import__('4-print_square').print_square
>>> print_square()
Traceback (most recent call last):
TypeError: print_square() missing 1 required positional argument: 'size'
>>> print_square(None)
Traceback (most recent call last):
TypeError: size must be an integer
>>> print_square(1e10000)
Traceback (most recent call last):
TypeError: size must be an integer
>>> print_square("3")
Traceback (most recent call last):
TypeError: size must be an integer
>>> print_square(0)
>>> print_square(1)
#
>>> print_square(int(float('NaN')))
Traceback (most recent call last):
ValueError: cannot convert float NaN to integer
>>> print_square(-23)
Traceback (most recent call last):
ValueError: size must be >= 0
>>> print_square(-23.4)
Traceback (most recent call last):
TypeError: size must be an integer