openvax / datacache

Helpers for transparently downloading datasets
Apache License 2.0
5 stars 7 forks source link

test_fetch_decompress failure #42

Open fabianegli opened 4 years ago

fabianegli commented 4 years ago

The test failures in #41 are probably linked to two issues in the test_fetch_decompress() test:

  1. The use_wget_if_available argument in fetch_file() results in different output for the function.
  2. the test test_fetch_decompress downloads one file, but in the second iteration of the for loop for the use_wget_if_available argument the file is already downloaded - that is what datacache does. And then the download is skipped and the test may succeed or fail for both -even if one option breaks the functionality - depending on if True or False comes first in the list
    • for use_wget_if_available in [True, False]: => test fails
    • for use_wget_if_available in [False, True]: => test succeeds

Remember to manually delete the downloaded files in the Homo_sapiens.GRCh37.75.dna_rm.chromosome.MT.fa.gz and Homo_sapiens.GRCh37.75.dna_rm.chromosome.MT.fa before each test run.

fabianegli commented 4 years ago

If use_wget_if_available is set to True the decompression results in an empty file.