-
Notifications
You must be signed in to change notification settings - Fork 59
Тимонова - Лабораторная работа #1 #5
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
Тимонова - Лабораторная работа #1 #5
Conversation
…agile-course-practice-python into timonova-anastasia-lab1
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.
This method is not covered by tests
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.
Test added.
И я бы не стал делать метод вычисления определителя (и некоторые другие) "статическим", логично, что он должен относится к объекту. Ну и визуально даже очевидно, что проще читается:
Или
|
function, added verification of square matrix
Updated method of determinant calculation too. |
@AlekseyNesmelov |
Где же тест на бросание исключения? |
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.
Первый тест test_check_constructor мне кажется немного некорректным. Думаю, имеет смысл разделить его на 2 теста, отдельно проверять, что создается матрица нужного размера и отдельно проверить значения. Условия из if записать в assertTrue
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.
Тест должен проверять корректное создание обьекта. Один тест на один обьект. А если у обьекта не три поля, а больше, сколько тогда делать тестов? Для каждого поля по тесту?
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.
по сути у тебя уже написаны проверки для каждого поля, только не в assert, а в if. я не настаиваю на том, что мой вариант идеален, возможно здесь что-то получше можно придумать, но так как есть точно оставлять не вариант. Смотри, если у тебя в if условие вдруг не выполниться, тест все равно не будет красным, то есть свою задачу обнаружения ошибок он не выполняет, вот в этом его некорректность, а не в том, что он один, а не два. признаю, я не очень ясно выразилась в прошлом комменте)
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.
Исправлено
…agile-course-practice-python into timonova-anastasia-lab1
@Daniil-Osokin |
Тимонова - Лабораторная работа #1
No description provided.