Skip to content

Добавлены Юнит-Тесы со 100% покрытием - #955

Open
aydar-khafizov wants to merge 2 commits into
Yandex-Practicum:mainfrom
aydar-khafizov:develop1
Open

aydar-khafizov wants to merge 2 commits into
Yandex-Practicum:mainfrom
aydar-khafizov:develop1

Conversation

@aydar-khafizov

Copy link
Copy Markdown

Задание 1: Юнит-тесты (Stellar Burgers)

Что сделано:
Покрыты юнит-тестами классы Bun, Burger, Ingredient, Database.
Использованы моки (Mock, patch) и параметризация (@pytest.mark.parametrize).
Настроен .coveragerc (демо-скрипт praktikum.py исключен из покрытия).
Тесты независимы и лежат в пакете tests.

Результаты:
49 тестов, все проходят.
Покрытие: 100%.
HTML-отчет сгенерирован (htmlcov/index.html).

Comment thread tests/test_bun.py Outdated
Comment on lines +23 to +24
assert bun.get_name() == name
assert bun.get_price() == price No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: здесь и далее: это юнит тесты, на каждый метод должен быть отдельный тест

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants