Skip to content

New tests and file README updated#27

Open
Mukhadim08 wants to merge 2 commits into
yandex-praktikum:mainfrom
Mukhadim08:develop
Open

New tests and file README updated#27
Mukhadim08 wants to merge 2 commits into
yandex-praktikum:mainfrom
Mukhadim08:develop

Conversation

@Mukhadim08
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread __pycache__/main.cpython-314.pyc Outdated
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 Outdated
def test_add_new_book_add_two_books(self):
# создаем экземпляр (объект) класса BooksCollector
collector = BooksCollector()
@pytest.fixture
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Нужно исправить: фикстуры нужно расположить в файле conftest.py

Comment thread tests.py Outdated
collector.add_new_book('Оно')
collector.add_book_in_favorites('Властелин колец')
collector.add_book_in_favorites('Оно')
assert collector.get_list_of_favorites_books() == ['Властелин колец', 'Оно'] No newline at end of file
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 и позитивный тест на get_book_genre. На каждый метод должен быть отдельный тест, вне зависимости, вызывается он в других тестах или нет

Comment thread tests.py Outdated
collector = BooksCollector()
@pytest.fixture
def collector(self):
return 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

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