Skip to content

Conversation

@Katesen1
Copy link
Collaborator

No description provided.

@Katesen1 Katesen1 changed the base branch from develop to main October 22, 2025 07:08
class TestBooksCollector:

def test_add_new_book_add_two_books(self):
collector = BooksCollector()

Choose a reason for hiding this comment

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

Можно лучше: создание объекта BooksCollector можно вынести в фикстуры. Фикстуры следует хранить в файле conftest

collector = BooksCollector()
collector.add_new_book('Гордость и предубеждение и зомби')
collector.add_new_book('Что делать, если ваш кот хочет вас убить')
assert len(collector.get_books_genre()) == 2

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