Skip to content

Added unit tests and pytest coverage report (100%)#779

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

Added unit tests and pytest coverage report (100%)#779
ulyana1995 wants to merge 2 commits into
Yandex-Practicum:mainfrom
ulyana1995:develop1

Conversation

@ulyana1995
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@irisqul irisqul left a comment

Choose a reason for hiding this comment

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

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

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

Comment thread tests/test_database.py Outdated

class TestDatabase:
def test_available_buns(self, database):
assert len(database.available_buns()) == 3
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Нужно исправить: мы тестируем не атрибуты экземпляров класса или наполнение базы данных, а методы приложения. Необходимо добавить шаги в которых будут использованы методы и проверить результат.

Copy link
Copy Markdown
Author

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