Coverage for b.py: 70%

# Coverage for b.py : 70%

## 17 statements

Hot-keys on this page

r m x p toggle line displays

j k next/prev highlighted chunk

0 (zero) top of page

1 (one) first highlighted chunk

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 never false

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 never false

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 ↛ 21, 20 ↛ 232 missed branches: 1) line 20 didn't jump to line 21, because the condition on line 20 was never true, 2) line 20 didn't jump to line 23, because the condition on line 20 was never false

21 a = 1

22 else:

23 a = 2

24 except:

25 pass

26

27 three()