diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2020-03-12 10:22:46 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2020-03-12 11:02:35 +0100 |
commit | 5d63f2a13c7aea499ae648fb00d86b43f24a9ba2 (patch) | |
tree | cd06f78d283cedfd749569591276cfef53b9d9a5 /tests/test_self.py | |
parent | e13aef8c7ead19fe200e1d8e9d273e5a0277278c (diff) | |
download | pylint-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.py | 17 |
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( [ |