summaryrefslogtreecommitdiff
path: root/tests/extensions/test_emptystring.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extensions/test_emptystring.py')
-rw-r--r--tests/extensions/test_emptystring.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/tests/extensions/test_emptystring.py b/tests/extensions/test_emptystring.py
deleted file mode 100644
index f89f9202f..000000000
--- a/tests/extensions/test_emptystring.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (c) 2016 Łukasz Rogalski <rogalski.91@gmail.com>
-# Copyright (c) 2016 Alexander Todorov <atodorov@otb.bg>
-# Copyright (c) 2017-2018, 2020 Claudiu Popa <pcmanticore@gmail.com>
-# Copyright (c) 2017 Derek Gustafson <degustaf@gmail.com>
-# Copyright (c) 2019-2021 Pierre Sassoulas <pierre.sassoulas@gmail.com>
-# Copyright (c) 2019 Ashley Whetter <ashley@awhetter.co.uk>
-# Copyright (c) 2020 hippo91 <guillaume.peillex@gmail.com>
-# Copyright (c) 2020 Damien Baty <damien.baty@polyconseil.fr>
-# Copyright (c) 2020 Anthony Sottile <asottile@umich.edu>
-# Copyright (c) 2021 Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
-# Copyright (c) 2021 Marc Mueller <30130371+cdce8p@users.noreply.github.com>
-
-# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
-
-"""Tests for the pylint checker in :mod:`pylint.extensions.emptystring
-"""
-from os import path as osp
-
-import pytest
-
-from pylint.extensions.emptystring import CompareToEmptyStringChecker
-from pylint.lint.pylinter import PyLinter
-
-
-@pytest.fixture(scope="module")
-def checker():
- return CompareToEmptyStringChecker
-
-
-@pytest.fixture(scope="module")
-def disable():
- return ["I"]
-
-
-def test_emptystring_message(linter: PyLinter) -> None:
- elif_test = osp.join(
- osp.dirname(osp.abspath(__file__)), "data", "empty_string_comparison.py"
- )
- linter.check([elif_test])
- msgs = linter.reporter.messages
- expected_lineno = [6, 9, 12, 15]
- assert len(msgs) == len(expected_lineno)
- for msg, lineno in zip(msgs, expected_lineno):
- assert msg.symbol == "compare-to-empty-string"
- assert msg.msg == "Avoid comparisons to empty string"
- assert msg.line == lineno