mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
style: format test_run_cmd.py with black
This commit is contained in:
parent
40993fecf7
commit
e0c806476f
1 changed files with 12 additions and 8 deletions
|
@ -1,23 +1,27 @@
|
|||
import pytest
|
||||
|
||||
from aider.run_cmd import run_cmd
|
||||
|
||||
|
||||
def test_run_cmd_echo():
|
||||
command = 'echo Hello, World!'
|
||||
command = "echo Hello, World!"
|
||||
exit_code, output = run_cmd(command)
|
||||
|
||||
assert exit_code == 0
|
||||
assert output.strip() == 'Hello, World!'
|
||||
assert output.strip() == "Hello, World!"
|
||||
|
||||
|
||||
def test_run_cmd_echo_with_quotes():
|
||||
command = 'echo "Hello, World!"'
|
||||
exit_code, output = run_cmd(command)
|
||||
|
||||
assert exit_code == 0
|
||||
assert output.strip() == 'Hello, World!'
|
||||
assert output.strip() == "Hello, World!"
|
||||
|
||||
|
||||
def test_run_cmd_invalid_command():
|
||||
command = 'invalid_command_that_does_not_exist'
|
||||
command = "invalid_command_that_does_not_exist"
|
||||
exit_code, output = run_cmd(command)
|
||||
|
||||
assert exit_code != 0
|
||||
assert 'command not found' in output.lower() or 'is not recognized' in output.lower()
|
||||
assert "command not found" in output.lower() or "is not recognized" in output.lower()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue