summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup.py3
-rw-r--r--tests/benchmark/test_baseline_benchmarks.py9
2 files changed, 7 insertions, 5 deletions
diff --git a/setup.py b/setup.py
index 7f1a1763c..606849326 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,3 @@
from setuptools import setup
-if __name__ == "__main__":
- setup()
+setup()
diff --git a/tests/benchmark/test_baseline_benchmarks.py b/tests/benchmark/test_baseline_benchmarks.py
index 6f79b1d7b..60ab96574 100644
--- a/tests/benchmark/test_baseline_benchmarks.py
+++ b/tests/benchmark/test_baseline_benchmarks.py
@@ -12,6 +12,7 @@
import os
import pprint
import time
+from unittest.mock import patch
import pytest
@@ -340,9 +341,11 @@ class TestEstablishBaselineBenchmarks:
linter = PyLinter()
# Register all checkers/extensions and enable them
- register_plugins(
- linter, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
- )
+ with patch("os.listdir", return_value=["pylint", "tests"]):
+ register_plugins(
+ linter,
+ os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")),
+ )
linter.load_default_plugins()
linter.enable("all")