Skip to content

Conversation

@Serg-nt
Copy link
Collaborator

@Serg-nt Serg-nt commented May 6, 2025

No description provided.

tests.py Outdated
Comment on lines 8 to 10
@pytest.fixture
def collector(self):
return BooksCollector()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Нужно исправить: фикстуры живут в conftest

tests.py Outdated
Comment on lines 21 to 26
def test_add_new_book_incorrect_add_book_unsuccessful_add(self, collector):
collector.add_new_book('Азбука')
assert len(collector.get_books_genre()) == 1
collector.add_new_book('Азбука')
assert len(collector.get_books_genre()) == 1
collector.add_new_book('Азбука' * 10)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Нужно исправить: в юнит тесте assert один и это должен быть параметризованный тест

tests.py Outdated
Comment on lines 34 to 39
def test_set_book_genre_incorrect_genre_unsuccess(self, collector):
collector.set_book_genre('Азбука', 'Ужасы')
assert len(collector.books_genre) == 0
collector.add_new_book('Азбука')
collector.set_book_genre('Азбука', 'FFFFFF')
assert collector.books_genre['Азбука'] == ''
Copy link
Collaborator

@AlexKitIt AlexKitIt May 6, 2025

Choose a reason for hiding this comment

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

здесь и далее: comment up

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.

3 participants