Skip to content

Commit e88c145

Browse files
Move the filter for isort 5 out of the generic function
1 parent e38dfbb commit e88c145

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/test_functional.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,16 @@ def get_functional_test_files_from_directory(
8080

8181
for filename in filenames:
8282
if filename != "__init__.py" and filename.endswith(".py"):
83-
# isort 5 has slightly different rules as isort 4. Testing
84-
# both would be hard: test with isort 5 only.
85-
if filename == "wrong_import_order.py" and not HAS_ISORT_5:
86-
continue
8783
suite.append(testutils.FunctionalTestFile(dirpath, filename))
8884
return suite
8985

9086

91-
TESTS = get_functional_test_files_from_directory(FUNCTIONAL_DIR)
87+
# isort 5 has slightly different rules as isort 4. Testing both would be hard: test with isort 5 only.
88+
TESTS = [
89+
t
90+
for t in get_functional_test_files_from_directory(FUNCTIONAL_DIR)
91+
if not (t.base == "wrong_import_order" and not HAS_ISORT_5)
92+
]
9293
TESTS_NAMES = [t.base for t in TESTS]
9394
TEST_WITH_EXPECTED_DEPRECATION = [
9495
"future_unicode_literals",

0 commit comments

Comments
 (0)