Skip to content

test: Rename python to python3 in tests #1223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/test___init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ def test__run_post_hooks_reports_missing_commands(self, project_with_dir: Projec
assert fake_command_name in error.detail

def test__run_post_hooks_reports_stdout_of_commands_that_error_with_no_stderr(self, project_with_dir):
failing_command = "python -c \"print('a message'); exit(1)\""
failing_command = "python3 -c \"print('a message'); exit(1)\""
project_with_dir.config.post_hooks = [failing_command]
project_with_dir._run_post_hooks()

assert len(project_with_dir.errors) == 1
error = project_with_dir.errors[0]
assert error.level == ErrorLevel.ERROR
assert error.header == "python failed"
assert error.header == "python3 failed"
assert "a message" in error.detail

def test__run_post_hooks_reports_stderr_of_commands_that_error(self, project_with_dir):
failing_command = "python -c \"print('a message'); raise Exception('some exception')\""
failing_command = "python3 -c \"print('a message'); raise Exception('some exception')\""
project_with_dir.config.post_hooks = [failing_command]
project_with_dir._run_post_hooks()

assert len(project_with_dir.errors) == 1
error = project_with_dir.errors[0]
assert error.level == ErrorLevel.ERROR
assert error.header == "python failed"
assert error.header == "python3 failed"
assert "some exception" in error.detail