Open
Conversation
Ayantea1
reviewed
Oct 26, 2025
| ] | ||
| ) | ||
| def test_set_book_genre_valid_input_genre_assigned(self, name, genre): | ||
| collector = BooksCollector() |
There was a problem hiding this comment.
Можно улучшить: общее для всех тестов предусловие лучше вынести в фикстуру
Ayantea1
reviewed
Oct 26, 2025
| books_in_genre = collector.get_books_with_specific_genre(genre) | ||
|
|
||
| # Проверяем, что все добавленные книги вернулись | ||
| assert books_in_genre == books |
There was a problem hiding this comment.
Можно улучшить: в тесте возвращаются все книги, а не выбираются нужные
Ayantea1
reviewed
Oct 26, 2025
| collector = BooksCollector() | ||
|
|
||
| # Проверяем, что у нового объекта словарь пуст | ||
| assert collector.get_books_genre() == {} |
There was a problem hiding this comment.
Нужно исправить: обязательно должна быть позитивная проверка возвращения словаря
Ayantea1
reviewed
Oct 26, 2025
| collector.set_book_genre(name, genre) | ||
|
|
||
| # Проверяем, что книга попала в список детских | ||
| assert name in collector.get_books_for_children() |
There was a problem hiding this comment.
можно лучше: также отсутствует проверка, что выбираются нужные книги
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.