Skip to content

Commit c96f1ad

Browse files
committed
Remove autotest section from generated README
1 parent 3c50af9 commit c96f1ad

2 files changed

Lines changed: 0 additions & 36 deletions

File tree

msra_codegen/templates/README.md.tpl

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -43,39 +43,6 @@ python -m camoufox fetch
4343
{{ pipeline_script_code }}
4444
```
4545

46-
{% if tests.has_autotests %}
47-
## Автотесты API (pytest + snapshots)
48-
49-
В проекте используется автотест-фреймворк из `human_requests`:
50-
51-
- endpoint-методы в бизнес-коде помечаются `@autotest`;
52-
- pytest-плагин сам находит эти методы и запускает их;
53-
- JSON-ответы проверяются через `pytest-jsonschema-snapshot` (`schemashot`);
54-
- параметры вызова и пост-обработка результата регистрируются в `tests/api_test.py` через:
55-
- `@autotest_params`
56-
- `@autotest_hook`
57-
- `@autotest_depends_on`
58-
59-
Минимальная конфигурация уже включена в `pyproject.toml`:
60-
61-
```ini
62-
[tool.pytest.ini_options]
63-
anyio_mode = "auto"
64-
autotest_start_class = "{{ tests.autotest_start_class }}"
65-
```
66-
67-
Запуск тестов:
68-
69-
```bash
70-
pytest
71-
```
72-
73-
Важно:
74-
75-
- используется `pytest-anyio` (не `pytest-asyncio`);
76-
- ручные тесты остаются только для кейсов, которые не относятся к JSON-схемам endpoint-методов (например, `download_image`).
77-
{% endif %}
78-
7946
Для более подробной информации смотрите референсы [документации]({{ readme.docs_url }}).
8047

8148
<div align="center">

tests/codegen.test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,10 +675,7 @@ test("python codegen generates both bundled msra documents without failing", ()
675675
const readmePipelineCode = extractMarkdownCodeFence(readmeText);
676676
const quickStartPipelineCode = extractRstPythonCodeBlock(quickStartText);
677677
assert.match(readmeText, /# Usage/);
678-
assert.match(readmeText, /## Автотесты API \(pytest \+ snapshots\)/);
679678
assert.match(readmeText, /### Принцип работы/);
680-
assert.match(readmeText, /pytest-jsonschema-snapshot/);
681-
assert.match(readmeText, /pytest-anyio/);
682679
assert.match(readmeText, /Ozon API integration for catalog browsing and cart flows/);
683680
assert.match(pyprojectText, /^description = "Ozon API integration for catalog browsing and cart flows"$/m);
684681
assert.match(readmeText, /```py[\s\S]*async def main\(\):/);

0 commit comments

Comments
 (0)