Skip to content

Sprint_4#8

Open
sanchos357-bit wants to merge 4 commits into
mainfrom
develop
Open

Sprint_4#8
sanchos357-bit wants to merge 4 commits into
mainfrom
develop

Conversation

@sanchos357-bit

Copy link
Copy Markdown
Owner

Добавлены тесты в tests.py
Добавлено описание тестов в README.md

Comment thread tests.py Outdated
assert len(collector.get_books_genre()) == 2

def test_set_book_genre_set_know_genre_book_added(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


@pytest.mark.parametrize('name', ['Я','Он','Дети завтрашнего дня','Дети завтрашнего дняПиксельпутеводитель','Компания с ограниченной ответственностью'])
def test_positive_input(name):

@irisqul irisqul Mar 20, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

нужно исправить: почему то тест вне тестового класса и название тестового метода не дает понимания что тестируется. нужно подвинуть на 4 пробела вправо

Comment thread tests.py
collector.delete_book_from_favorites('Гордость и предубеждение и зомби')

assert collector.get_list_of_favorites_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.

Нужно исправить: отсутствуют тесты на проверку методов get_books_genre. На каждый метод должен быть отдельный тест, вне зависимости, вызывается он в других тестах или нет

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