test_exceptions 589 Bytes
Newer Older
1 2
test_exceptions
5. Built-in exceptions
3
spam
4
AttributeError
5
spam
6
EOFError
7
spam
8
IOError
9
spam
10
ImportError
11
spam
12
IndexError
13
spam
14
KeyError
15
spam
16 17
KeyboardInterrupt
(not testable in a script)
18
spam
19 20
MemoryError
(not safe to test)
21
spam
22
NameError
23
spam
24
OverflowError
25
spam
26 27
RuntimeError
(not used any more?)
28
spam
29
SyntaxError
30
'continue' not supported inside 'finally' clause
31 32 33 34 35
ok
'continue' not properly in loop
ok
'continue' not properly in loop
ok
36
spam
37 38 39 40
IndentationError
spam
TabError
spam
41 42
SystemError
(hard to reproduce)
43
spam
44
SystemExit
45
spam
46
TypeError
47
spam
48
ValueError
49
spam
50
ZeroDivisionError
51
spam
52
Exception