Skip to content

Sprint_4 - #9

Open
Mex613 wants to merge 2 commits into
mainfrom
develop
Open

Sprint_4#9
Mex613 wants to merge 2 commits into
mainfrom
develop

Conversation

@Mex613

@Mex613 Mex613 commented May 30, 2026

Copy link
Copy Markdown
Owner

No description provided.

Comment thread tests.py
Comment on lines +18 to +30
def test_add_new_book_empty_name(self):
collector = BooksCollector()
empty_name = ''
collector.add_new_book(empty_name)
books = collector.get_books_genre()
assert empty_name not in books

def test_add_new_book_long_name(self):
collector = BooksCollector()
long_name = 'a' * 41
collector.add_new_book(long_name)
books = collector.get_books_genre()
assert long_name not in books

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Можно лучше: шаги этих тестов схожи. Можно их объединить с помощью параметризации

Comment thread tests.py
assert books[book_name] == ''

# добавляем две книги
def test_add_new_book_empty_name(self):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Необходимо исправить: не хватает позитивных тестов на проверку границы имени

Comment thread tests.py

def test_add_new_book_two_books(self):
collector = BooksCollector()
collector.add_new_book('Гордость и предубеждение и зомби')

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