summaryrefslogtreecommitdiff
path: root/tests/lint
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2022-05-09 09:05:56 +0200
committerGitHub <noreply@github.com>2022-05-09 09:05:56 +0200
commitf020b2f07361fa2b577bc07c4a68309905bd46ae (patch)
treea1d1880451fac270df94ce861677e736b2c9163c /tests/lint
parent40ddfabcb0afe5dadab3c4dcd890b8302db9edd0 (diff)
downloadpylint-git-f020b2f07361fa2b577bc07c4a68309905bd46ae.tar.gz
Revert "Do not append namespace packages to sys.path (#6405)" (#6548)
This reverts commit 603be8408a5d2d98283f41cfd9a94998fd7cfd3c.
Diffstat (limited to 'tests/lint')
-rw-r--r--tests/lint/test_namespace_packages.py25
-rw-r--r--tests/lint/unittest_expand_modules.py8
2 files changed, 0 insertions, 33 deletions
diff --git a/tests/lint/test_namespace_packages.py b/tests/lint/test_namespace_packages.py
deleted file mode 100644
index 6ac96f09e..000000000
--- a/tests/lint/test_namespace_packages.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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
-# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
-
-"""Tests related to linting of namespace packages."""
-
-from io import StringIO
-
-from pylint.reporters.text import TextReporter
-from pylint.testutils._run import _Run as Run
-
-
-def test_namespace_package_sys_path() -> None:
- """Test that we do not append namespace packages to sys.path.
-
- The test package is based on https://github.com/PyCQA/pylint/issues/2648.
- """
- pylint_output = StringIO()
- reporter = TextReporter(pylint_output)
- runner = Run(
- ["tests/regrtest_data/namespace_import_self/"],
- reporter=reporter,
- exit=False,
- )
- assert not runner.linter.stats.by_msg
diff --git a/tests/lint/unittest_expand_modules.py b/tests/lint/unittest_expand_modules.py
index 1ce5b6c4e..15f72d0c5 100644
--- a/tests/lint/unittest_expand_modules.py
+++ b/tests/lint/unittest_expand_modules.py
@@ -77,13 +77,6 @@ test_caching = {
"path": str(TEST_DIRECTORY / "lint/test_caching.py"),
}
-test_namespace_packages = {
- "basename": "lint",
- "basepath": INIT_PATH,
- "isarg": False,
- "name": "lint.test_namespace_packages",
- "path": str(TEST_DIRECTORY / "lint/test_namespace_packages.py"),
-}
init_of_package = {
"basename": "lint",
@@ -115,7 +108,6 @@ class TestExpandModules(CheckerTestCase):
[
init_of_package,
test_caching,
- test_namespace_packages,
test_pylinter,
test_utils,
this_file_from_init,