참고소스 수정본
This commit is contained in:
15
참고/instructor-main/tests/docs/test_examples_batch.py
Normal file
15
참고/instructor-main/tests/docs/test_examples_batch.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import pytest
|
||||
from pytest_examples import CodeExample, EvalExample
|
||||
|
||||
from tests.docs._example_groups import BATCH, collect_examples, example_paths
|
||||
|
||||
code_examples = collect_examples(example_paths(BATCH))
|
||||
|
||||
|
||||
@pytest.mark.parametrize("example", code_examples, ids=str)
|
||||
def test_examples_batch(example: CodeExample, eval_example: EvalExample):
|
||||
if eval_example.update_examples:
|
||||
eval_example.format(example)
|
||||
eval_example.run_print_update(example)
|
||||
else:
|
||||
eval_example.lint(example)
|
||||
Reference in New Issue
Block a user