-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Port test_datasets_utils to pytest #4114
Conversation
#4113 makes the decompression maps public. I'll update ( |
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.
Thanks a lot @AnirudhDagar , this looks great!
I just have one comment below which hopefully @pmeier can confirm
Some tests in the CI are failing but they seem unrelated to this PR. |
Thanks a lot @AnirudhDagar !! |
Reviewed By: fmassa Differential Revision: D29395325 fbshipit-source-id: f0313af872dc410cd9d5923c2f360133e6dc82b4
Fixes #4063
@NicolasHug apologies for the delay. Please note the following main changes (might be helpful in reviewing the PR):
test_detect_file_type
is parametrized overfile, expected
test_detect_file_type_incompatible
now represents and clubs the following three different tests:test_detect_file_type_no_ext
test_detect_file_type_unknown_compression
test_detect_file_type_unknown_partial_ext
test_decompress
is parametrized overextension
and makes use of_COMPRESSED_FILE_OPENERS
dict
defined intorchvision.datasets.utils
. This also clubs following tests into one:test_decompress_bz2
test_decompress_gzip
test_decompress_lzma
test_extract_archive_defer_to_decompress
is parametrized overextension
andremove_finished
and makes use ofpytest-mock
. Note the original copy required to avoid mockedutils._decompress
function in the final assert.test_extract_tar
is parametrized overextension, mode
combiningtest_extract_tar
andtest_extract_tar_xz
into one.