mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 20:30:41 +08:00
Format files by pre-commit run -a
Signed-off-by: Yu Ishikawa <yu-iskw@users.noreply.github.com>
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
|
||||
# Generated by CodiumAI
|
||||
import pytest
|
||||
|
||||
from pr_agent.algo.utils import try_fix_yaml
|
||||
|
||||
|
||||
import pytest
|
||||
|
||||
class TestTryFixYaml:
|
||||
|
||||
# The function successfully parses a valid YAML string.
|
||||
@ -54,7 +54,7 @@ code_suggestions:
|
||||
src/index.ts
|
||||
label: |
|
||||
best practice
|
||||
|
||||
|
||||
- relevant_file: |
|
||||
src/index2.ts
|
||||
label: |
|
||||
@ -87,4 +87,4 @@ code_suggestions:
|
||||
We can further improve the code by using the `const` keyword instead of `var` in the `src/index.ts` file.
|
||||
'''
|
||||
expected_output = {'code_suggestions': [{'relevant_file': 'src/index.ts\n', 'label': 'best practice\n'}, {'relevant_file': 'src/index2.ts\n', 'label': 'enhancment'}]}
|
||||
assert try_fix_yaml(review_text, first_key='code_suggestions', last_key='label') == expected_output
|
||||
assert try_fix_yaml(review_text, first_key='code_suggestions', last_key='label') == expected_output
|
||||
|
Reference in New Issue
Block a user