Skip to content

Commit e38dfbb

Browse files
Rename get_tests to get_functional_test_files_from_directory
And use Path instead of os
1 parent c209dc0 commit e38dfbb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_functional.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
# 'Wet finger' number of files that are reasonable to display by an IDE
4444
# 'Wet finger' as in 'in my settings there are precisely this many'.
4545
REASONABLY_DISPLAYABLE_VERTICALLY = 48
46+
FUNCTIONAL_DIR = Path(__file__).parent.resolve() / "functional"
4647

4748

4849
class LintModuleOutputUpdate(testutils.LintModuleTest):
@@ -65,7 +66,9 @@ def _check_output_text(self, _, expected_output, actual_output):
6566
writer.writerow(line.to_csv())
6667

6768

68-
def get_tests(input_dir: Union[Path, str]) -> List[FunctionalTestFile]:
69+
def get_functional_test_files_from_directory(
70+
input_dir: Union[Path, str]
71+
) -> List[FunctionalTestFile]:
6972
suite = []
7073
for dirpath, _, filenames in os.walk(input_dir):
7174
if dirpath.endswith("__pycache__"):
@@ -85,9 +88,7 @@ def get_tests(input_dir: Union[Path, str]) -> List[FunctionalTestFile]:
8588
return suite
8689

8790

88-
TESTS = get_tests(
89-
os.path.join(os.path.dirname(os.path.abspath(__file__)), "functional")
90-
)
91+
TESTS = get_functional_test_files_from_directory(FUNCTIONAL_DIR)
9192
TESTS_NAMES = [t.base for t in TESTS]
9293
TEST_WITH_EXPECTED_DEPRECATION = [
9394
"future_unicode_literals",

0 commit comments

Comments
 (0)