diff --git a/tests/check_shebang_scripts_are_executable_test.py b/tests/check_shebang_scripts_are_executable_test.py index e4bd07c..7c2696d 100644 --- a/tests/check_shebang_scripts_are_executable_test.py +++ b/tests/check_shebang_scripts_are_executable_test.py @@ -1,7 +1,5 @@ from __future__ import annotations -import os - import pytest from pre_commit_hooks.check_shebang_scripts_are_executable import \ @@ -83,7 +81,5 @@ def test_git_executable_shebang(temp_git_dir, content, mode, expected): cmd_output('chmod', mode, str(path)) cmd_output('git', 'update-index', f'--chmod={mode}', str(path)) - # simulate how identify chooses that something is executable - filenames = [path for path in [str(path)] if os.access(path, os.X_OK)] - - assert main(filenames) == expected + files = (str(path),) + assert main(files) == expected