summaryrefslogtreecommitdiff
path: root/testsuite/E71.py
blob: b4b53afcc39df4ca840e782530896b11da84249c (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#: E711
if res == None:
    pass
#: E711
if res != None:
    pass
#: E711
if None == res:
    pass
#: E711
if None != res:
    pass
#: E711
if res[1] == None:
    pass
#: E711
if res[1] != None:
    pass
#: E711
if None != res[1]:
    pass
#: E711
if None == res[1]:
    pass

#
#: E712
if res == True:
    pass
#: E712
if res != False:
    pass
#: E712
if True != res:
    pass
#: E712
if False == res:
    pass
#: E712
if res[1] == True:
    pass
#: E712
if res[1] != False:
    pass
#: E712 E712
var = 1 if cond == True else -1 if cond == False else cond

#
#: E713
if not X in Y:
    pass
#: E713
if not X.B in Y:
    pass
#: E713
if not X in Y and Z == "zero":
    pass
#: E713
if X == "zero" or not Y in Z:
    pass

#
#: E714
if not X is Y:
    pass
#: E714
if not X.B is Y:
    pass
#: E714
if not X is Y is not Z:
    pass
#: E714
if not X is not Y:
    pass

#
#: Okay
if x not in y:
    pass

if not (X in Y or X is Z):
    pass

if not (X in Y):
    pass

if x is not y:
    pass

if X is not Y is not Z:
    pass

if TrueElement.get_element(True) == TrueElement.get_element(False):
    pass

if (True) == TrueElement or x == TrueElement:
    pass

assert (not foo) in bar
assert {'x': not foo} in bar
assert [42, not foo] in bar
#: