Sprint_4#7
Open
PLAYERZOYA wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Необходимо исправить: эта директория лишняя в проекте. Необходимо убрать её из ветки и добавить в .gitignore в корне проекта
|
|
||
| from main import BooksCollector | ||
|
|
||
| books = [ |
There was a problem hiding this comment.
Можно лучше: в модулях с тестами должны быть только тесты. Стоит вынести в отдельный модуль data
| collector.add_new_book('Гордость и предубеждение и зомби') | ||
| collector.add_new_book('Что делать, если ваш кот хочет вас убить') | ||
| collector.add_new_book("Гордость и предубеждение и зомби") | ||
| collector.add_new_book("Что делать, если ваш кот хочет вас убить") |
There was a problem hiding this comment.
Необходимо исправить: не хватает тестов на проверку границ имени книги (позитивные+негативные), повторное добавление книги, добавление в избранное книги которая не была добавлена в коллекцию
Comment on lines
+112
to
+151
| def test_add_new_book_add_empty_string(self): | ||
|
|
||
| collector = BooksCollector() | ||
|
|
||
| collector.add_new_book("") | ||
|
|
||
| assert len(collector.get_books_genre()) == 0 | ||
|
|
||
|
|
||
| def test_add_new_book_add_lenght_1(self): | ||
|
|
||
| collector = BooksCollector() | ||
|
|
||
| collector.add_new_book("В") | ||
|
|
||
| assert len(collector.get_books_genre()) == 1 | ||
|
|
||
|
|
||
| def test_add_new_book_add_lenght_39(self): | ||
|
|
||
| collector = BooksCollector() | ||
|
|
||
| collector.add_new_book("ВиноизодуванчиковВиноизодуванчиковВинои") | ||
|
|
||
| assert len(collector.get_books_genre()) == 1 | ||
|
|
||
|
|
||
| def test_add_new_book_add_lenght_40(self): | ||
|
|
||
| collector = BooksCollector() | ||
|
|
||
| collector.add_new_book("ВиноизодуванчиковВиноизодуванчиковВиноиз") | ||
|
|
||
| assert len(collector.get_books_genre()) == 1 | ||
|
|
||
|
|
||
| def test_add_new_book_add_lenght_41(self): | ||
|
|
||
| collector = BooksCollector() | ||
|
|
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.
тест, который был изначально, не работает, но я не стала его трогать