Conversation
Melevir
reviewed
May 30, 2023
| assert build_url(host_name, relative_url, get_params) == expected_result | ||
|
|
||
|
|
||
| def test__build_url_only_host_name_typeerror(): |
Contributor
There was a problem hiding this comment.
В этом файле почти везде потерялись вторые подчёркивания
| ("2023,12,15", "19:55", datetime.datetime(datetime.date.today().year, | ||
| datetime.date.today().month, | ||
| datetime.date.today().day, | ||
| 19, 55)), |
Contributor
There was a problem hiding this comment.
В фикстурах лучше стараться держать данные постатичнее и попроще. Например, ты можешь тут хранить количество дней, которые добавить к тудей, чай и минуту, а сам объект datetime собирать уже в тесте.
| ) | ||
| def test__compose_datetime_from__error(date_str, time_str, expected_error, need_time_str): | ||
| with pytest.raises(expected_error): | ||
| if need_time_str == 1: |
Contributor
There was a problem hiding this comment.
В python для такого используется не 1/0, а True/False
| (0, 0, TypeError, 0, 0), | ||
| ] | ||
| ) | ||
| def test__first__errors(items, default, expected_error, items_need, default_need): |
Contributor
There was a problem hiding this comment.
В тесте не дожно быть такой вложенности и такого количества условий. В таком случае лучше разбить на несколько простых тестов
| ] | ||
| ) | ||
| def test__replace_word__errors(text, replace_from, replace_to, expected_error): | ||
| with pytest.raises(expected_error): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Собрала эрроры в параметрайзы