summaryrefslogtreecommitdiff
path: root/tests/functional/ext/emptystring/empty_string_comparison.py
blob: b61caeff617156f23956689bbd27d8c41bcfa624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# pylint: disable=literal-comparison,missing-docstring

X = ''
Y = 'test'

if X is '':  # [compare-to-empty-string]
    pass

if Y is not "":  # [compare-to-empty-string]
    pass

if X == "":  # [compare-to-empty-string]
    pass

if Y != '':  # [compare-to-empty-string]
    pass

if "" == Y:  # [compare-to-empty-string]
    pass

if '' != X:  # [compare-to-empty-string]
    pass