vericast / conda-mirror

Mirror upstream conda channels
BSD 3-Clause "New" or "Revised" License
71 stars 59 forks source link

TST: Fix broken test #46

Closed ericdill closed 7 years ago

ericdill commented 7 years ago

Couldn't figure out why this test was intermittently failing. Turns out that the top level keys of the repodata dict were conda-forge and https://repo.continuum.io/pkgs/free. Fun fact: dictionaries in python 3 do not have deterministic ordering, so when I was doing next(iter(repodata.keys())) I would be getting conda-forge or https://repo.continuum.io/pkgs/free in an effectively random fashion. If I was unlucky and got https://repo.continuum.io/pkgs/free, then the tests would fail because pytest was trying to write to a very deeply nested folder:

 '/tmp/pytest-of-p-edill/pytest-10/test_cli_conda_forge_linux_64_0/conda-forge/linux-64/https://repo.continuum.io/pkgs/free'

Also, the colon in the file path probably wasn't helping matters...

In any event, that was not the desired behavior. What I really wanted to get were the package names in that repodata dictionary which requires the change in this PR

codecov[bot] commented 7 years ago

Codecov Report

Merging #46 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #46   +/-   ##
=======================================
  Coverage   94.06%   94.06%           
=======================================
  Files           2        2           
  Lines         219      219           
=======================================
  Hits          206      206           
  Misses         13       13

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8159290...68e40e4. Read the comment docs.

parente commented 7 years ago

Nice catch.