-
Notifications
You must be signed in to change notification settings - Fork 21
Sprint_4 #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Sprint_4 #13
Conversation
tests.py
Outdated
|
|
||
| # класс TestBooksCollector объединяет набор тестов, которыми мы покрываем наше приложение BooksCollector | ||
| # обязательно указывать префикс Test | ||
| name_n_genre = [["Тень за стеной", "Ужасы"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Нужно исправить: тестовые данные хранятся в data
tests.py
Outdated
| @pytest.fixture | ||
| def collector_with_books(self): | ||
| collector = BooksCollector() | ||
| for name, genre in name_n_genre: | ||
| collector.add_new_book(name) | ||
| collector.set_book_genre(name, genre) | ||
| return collector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Нужно исправить: фикстуры живут в модуле conftest
|
|
||
| # напиши свои тесты ниже | ||
| # чтобы тесты были независимыми в каждом из них создавай отдельный экземпляр класса BooksCollector() | ||
| assert set(list_favorite_books) == {first_book, second_book} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Нужно исправить: отсутствуют тесты на проверку методов get_book_genre и get_list_of_favorites_books
Тестирование приложения BooksCollector