Skip to content
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

Add machine-readable output format, and test #3473

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 26, 2024
commit 2dbed9ce619900b70a599a61bfa6ee2f2b9e233b
4 changes: 2 additions & 2 deletions codespell_lib/tests/test_basic.py
Original file line number Diff line number Diff line change
@@ -342,8 +342,8 @@ def test_machine_readable(
result = cs.main(fname, "--machine-readable", std=True)
assert isinstance(result, tuple)
code, stdout, stderr = result
output_lines = [line for line in stdout.split('\n') if line]
assert all([outline.startswith('@') for outline in output_lines])
output_lines = [line for line in stdout.split("\n") if line]
assert all([outline.startswith("@") for outline in output_lines])
assert "line 1, col 1, abandonned ==> abandoned" in output_lines[0]
assert "line 2, col 13" in output_lines[1]
assert "line 3, col 10" in output_lines[2]
Loading