Coverage for b.py: 70%

17 statements  

« prev     ^ index     » next       coverage.py v7.6.8a0.dev1, created at 2024-11-23 15:15 -0500

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 always true

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 always true

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 ↛ anywhereline 20 didn't jump anywhere: it always raised an exception.

21 a = 1 

22 else: 

23 a = 2 

24 except: 

25 pass 

26 

27three()