summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-11-28 13:12:10 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-12-03 18:38:20 +0100
commite88c145acc473e895763d0ff6e2d51a1a5034e95 (patch)
treebea74616b4e4c0d5bf3cf18e417313297a58da08
parente38dfbbf597a25d9f5f96e5c9030cf43ef58257e (diff)
downloadpylint-git-e88c145acc473e895763d0ff6e2d51a1a5034e95.tar.gz
Move the filter for isort 5 out of the generic function
-rw-r--r--tests/test_functional.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test_functional.py b/tests/test_functional.py
index c0badfbe3..d1d8d6d11 100644
--- a/tests/test_functional.py
+++ b/tests/test_functional.py
@@ -80,15 +80,16 @@ def get_functional_test_files_from_directory(
for filename in filenames:
if filename != "__init__.py" and filename.endswith(".py"):
- # isort 5 has slightly different rules as isort 4. Testing
- # both would be hard: test with isort 5 only.
- if filename == "wrong_import_order.py" and not HAS_ISORT_5:
- continue
suite.append(testutils.FunctionalTestFile(dirpath, filename))
return suite
-TESTS = get_functional_test_files_from_directory(FUNCTIONAL_DIR)
+# isort 5 has slightly different rules as isort 4. Testing both would be hard: test with isort 5 only.
+TESTS = [
+ t
+ for t in get_functional_test_files_from_directory(FUNCTIONAL_DIR)
+ if not (t.base == "wrong_import_order" and not HAS_ISORT_5)
+]
TESTS_NAMES = [t.base for t in TESTS]
TEST_WITH_EXPECTED_DEPRECATION = [
"future_unicode_literals",