File: white.py%2Ccover

package info (click to toggle)
python-coverage 7.6.0%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,120 kB
  • sloc: python: 30,196; ansic: 1,181; javascript: 773; makefile: 293; sh: 107; xml: 48
file content (33 lines) | stat: -rw-r--r-- 527 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  # A test case sent to me by Steve White
  
> def f(self):
!     if self==1:
!         pass
!     elif self.m('fred'):
!         pass
!     elif (g==1) and (b==2):
!         pass
!     elif self.m('fred')==True:
!         pass
!     elif ((g==1) and (b==2))==True:
!         pass
!     else:
!         pass
  
> def g(x):
>     if x == 1:
>         a = 1
!     else:
!         a = 2
  
> g(1)
  
> def h(x):
-     if 0:   #pragma: no cover
-         pass
>     if x == 1:
!         a = 1
>     else:
>         a = 2
  
> h(2)