Skip to content

Conversation

@Niplou
Copy link

@Niplou Niplou commented Dec 5, 2025

No description provided.

@Niplou Niplou changed the title UI tests was writed for Stellar Burgers unit tests was writed for Stellar Burgers Dec 5, 2025

# Должен поднять IndexError при попытке переместить несуществующий индекс
with pytest.raises(IndexError):
burger.move_ingredient(5, 0)
Copy link

Choose a reason for hiding this comment

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

нужно исправить: нужно протестировать используя assert

test_burger.py Outdated
"= filling cutlet =",
"(==== black bun ====)",
"", # Пустая строка после второй булки
"Price: 0"
Copy link

Choose a reason for hiding this comment

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

можно лучше: тут много всего, было бы оптимально создать файл с тестовыми данными для этого

test_burger.py Outdated
result = burger.get_price()

assert result == 325 # 100*2 + 50 + 75
mock_bun.get_price.assert_called_once()
Copy link

Choose a reason for hiding this comment

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

а что это за строки после ассертов?

@irisqul
Copy link

irisqul commented Dec 6, 2025

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

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

@Niplou Niplou changed the title unit tests was writed for Stellar Burgers UNIT tests was wrote for Stellar Burgers Dec 7, 2025
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