Skip to content

Develop#9

Open
TaisiaYa wants to merge 3 commits into
mainfrom
develop
Open

Develop#9
TaisiaYa wants to merge 3 commits into
mainfrom
develop

Conversation

@TaisiaYa
Copy link
Copy Markdown
Owner

добавлены тесты

Comment thread tests.py Outdated

# Тест метода set_book_genre
def test_set_book_genre(self):
collector = BooksCollector()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Отлично: в каждом тесте создается собственный экземпляр BooksCollector, но можно лучше - перенести создание экземпляра в фикстуры в отдельный файл conftest, а не повторять это предусловие в каждом тесте

Comment thread tests.py Outdated
def test_get_book_genre(self):
collector = BooksCollector()
collector.add_new_book('Вишневый сад')
collector.set_book_genre('Вишневый сад', 'Комедия')
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.

2 participants