summaryrefslogtreecommitdiff
path: root/tests/functional/t/too/too_many_boolean_expressions.py
blob: e8753859cf6ab8072efea8af64e569449de648c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Checks for if statements containing too many boolean expressions"""

# pylint: disable=invalid-name, comparison-with-itself, chained-comparison, condition-evals-to-constant

x = y = z = 5
if x > -5 and x < 5 and y > -5 and y < 5 and z > -5 and z < 5:  # [too-many-boolean-expressions]
    pass
elif True and False and 1 and 2 and 3:
    pass
elif True and False and 1 and 2 and 3 and 4 and 5: # [too-many-boolean-expressions]
    pass
elif True and (True and True) and (x == 5 or True or True): # [too-many-boolean-expressions]
    pass
elif True and (True or (x > -5 and x < 5 and (z > -5 or z < 5))): # [too-many-boolean-expressions]
    pass
elif True == True == True == True == True == True:
    pass

if True and False and 1 and 2 and 3:
    pass