Skip to content

Unit tests for Stellar Burgers classes - #937

Open
shenziwork-blip wants to merge 6 commits into
Yandex-Practicum:mainfrom
shenziwork-blip:develop1
Open

shenziwork-blip wants to merge 6 commits into
Yandex-Practicum:mainfrom
shenziwork-blip:develop1

Conversation

@shenziwork-blip

Copy link
Copy Markdown

Добавлены юнит-тесты на классы Bun, Ingredient, Database, Burger.
Покрытие: 77%.

@irisqul irisqul left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Сильные стороны:

  • Код запускается без ошибок
  • Тестовая архитектура соответствует изученным практикам написания юниттестов
  • Обеспечено необходимое тестовое покрытие

Comment thread tests/bun_test.py
def test_bun_get_name_and_price(self, name, price):
bun = Bun(name, price)

assert bun.get_name() == name

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread tests/ingredient_test.py
def test_ingredient_getters(self, ingredient_type, name, price):
ingredient = Ingredient(ingredient_type, name, price)

assert ingredient.get_type() == ingredient_type

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.

3 participants