Skip to content

Unit tests Recipe.download_file() partly #1952

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

Merged

Conversation

AndreMiras
Copy link
Member

Follow up of #1946.
Increases coverage by testing part of Recipe.download_file() handling
https schema. Next up would be to handle more schemas in the tests.
Also addressed @opacam comments from previous pull requests.

inclement
inclement previously approved these changes Aug 5, 2019
tempfile.TemporaryDirectory()) as temp_dir:
recipe.ctx.setup_dirs(temp_dir)
assert recipe.download_file(url, filename) == filename
assert m_urlretrieve.call_args_list == [mock.call(
Copy link
Member

Choose a reason for hiding this comment

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

Nicer to put mock.call on the next line with everything else.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks addressed 👍

Follow up of kivy#1946.
Increases coverage by testing part of `Recipe.download_file()` handling
https schema. Next up would be to handle more schemas in the tests.
Also addressed @opacam comments from previous pull requests.
@AndreMiras AndreMiras force-pushed the feature/unit_test_recipe_download_part2 branch from 730e971 to 8a4f5b1 Compare August 5, 2019 21:18
@inclement inclement merged commit 5abb0ec into kivy:develop Aug 5, 2019
@inclement
Copy link
Member

Thanks!

@AndreMiras AndreMiras deleted the feature/unit_test_recipe_download_part2 branch August 5, 2019 21:34
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