Coverage for b.py: 70%

1 def one(x):

2 # This will be a branch that misses the else.

3 if x < 2: 3 ↛ 6line 3 didn't jump to line 6 because the condition on line 3 was always true

4 a = 3

5 else:

6 a = 4

7

8 one(1)

9

10 def two(x):

11 # A missed else that branches to "exit"

12 if x: 12 ↛ exitline 12 didn't return from function 'two' because the condition on line 12 was always true

13 a = 5

14

15 two(1)

16

17 def three():

18 try:

19 # This if has two branches, *neither* one taken.

20 if name_error_this_variable_doesnt_exist: 20 ↛ anywhereline 20 didn't jump anywhere: it always raised an exception.

21 a = 1

22 else:

23 a = 2

24 except:

25 pass

26

27 three()