summaryrefslogtreecommitdiff
path: root/tests/test_self.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2020-03-12 10:22:46 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2020-03-12 11:02:35 +0100
commit5d63f2a13c7aea499ae648fb00d86b43f24a9ba2 (patch)
treecd06f78d283cedfd749569591276cfef53b9d9a5 /tests/test_self.py
parente13aef8c7ead19fe200e1d8e9d273e5a0277278c (diff)
downloadpylint-git-5d63f2a13c7aea499ae648fb00d86b43f24a9ba2.tar.gz
Add more tests for loading a malitious astroid file
Diffstat (limited to 'tests/test_self.py')
-rw-r--r--tests/test_self.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/test_self.py b/tests/test_self.py
index 65ff6ee45..38b4ed4a4 100644
--- a/tests/test_self.py
+++ b/tests/test_self.py
@@ -683,7 +683,22 @@ class TestRunTC(object):
cwd=str(tmpdir),
)
- # Test with multiple jobs
+ # Linting this astroid file does not import it
+ with tmpdir.as_cwd():
+ subprocess.check_output(
+ [
+ sys.executable,
+ "-m",
+ "pylint",
+ "-j2",
+ "astroid.py",
+ "--disable=import-error,unused-import",
+ ],
+ cwd=str(tmpdir),
+ )
+
+ # Test with multiple jobs for hmac.py for which we have a
+ # CVE against: https://github.com/PyCQA/pylint/issues/959
with tmpdir.as_cwd():
subprocess.call(
[