Completed
Push — master ( 449e73...c6f33b )
by Ionel Cristian
01:09
created

tests.Bad   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 3
Duplicated Lines 0 %
Metric Value
dl 0
loc 3
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A Bad.__repr__() 0 2 1
1
class Bad(Exception):
2
    def __repr__(self):
3
        raise RuntimeError("I'm a bad class!")
4
5
6
def a():
7
    x = Bad()
8
    return x
9
10
def b():
11
    x = Bad()
12
    raise x
13
14
a()
15
try:
16
    b()
17
except Exception as exc:
18
    print(exc)
19