diff --git a/tests/unit_tests.py b/tests/unit_tests.py index 219711a..740fff4 100644 --- a/tests/unit_tests.py +++ b/tests/unit_tests.py @@ -1615,9 +1615,7 @@ class TestFileIsUtf8(unittest.TestCase): def test_file_is_utf8(self): current_dir = os.path.dirname(os.path.abspath(__file__)) input_files_dir = os.path.join(current_dir, "assets", "file_is_utf8_test") - files_to_test = os.listdir(input_files_dir) - - for file_to_test in files_to_test: + for file_to_test in os.listdir(input_files_dir): if file_to_test.startswith("true_"): is_utf8 = workbench_utils.file_is_utf8( os.path.join(input_files_dir, file_to_test) @@ -1627,9 +1625,7 @@ def test_file_is_utf8(self): def test_file_is_not_utf8(self): current_dir = os.path.dirname(os.path.abspath(__file__)) input_files_dir = os.path.join(current_dir, "assets", "file_is_utf8_test") - files_to_test = os.listdir(input_files_dir) - - for file_to_test in files_to_test: + for file_to_test in os.listdir(input_files_dir): if file_to_test.startswith("false_"): is_utf8 = workbench_utils.file_is_utf8( os.path.join(input_files_dir, file_to_test)