fix: strip whitespace from shell command in test assertion

This commit is contained in:
Paul Gauthier (aider) 2024-08-27 14:05:10 -07:00
parent ac9aaff3cf
commit 825a94f7f0

View file

@ -773,7 +773,7 @@ This command will print 'Hello, World!' to the console."""
# Check if the shell command was added to the list
self.assertEqual(len(coder.shell_commands), 1)
self.assertEqual(coder.shell_commands[0], 'echo "Hello, World!"')
self.assertEqual(coder.shell_commands[0].strip(), 'echo "Hello, World!"')
# Check if handle_shell_commands was called with the correct argument
coder.handle_shell_commands.assert_called_once_with('echo "Hello, World!"', ANY)