Coverage for b.py: 70%

17 statements  

« prev     ^ index     » next       coverage.py v6.4a0, created at 2022-05-20 16:29 -0400

1def 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 

8one(1) 

9 

10def 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 

15two(1) 

16 

17def 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 

27three()