From eb64f852dd41ad3b9edd692f6b0e1434f26de83c Mon Sep 17 00:00:00 2001 From: Andrew Hearin Date: Wed, 28 Sep 2022 11:00:44 -0500 Subject: [PATCH] Fix bug in download manager --- halotools/sim_manager/download_manager.py | 1 + halotools/sim_manager/tests/test_download_manager.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/halotools/sim_manager/download_manager.py b/halotools/sim_manager/download_manager.py index 3e37a4523..57672a81b 100644 --- a/halotools/sim_manager/download_manager.py +++ b/halotools/sim_manager/download_manager.py @@ -276,6 +276,7 @@ def download_processed_halo_table( (len(close_matches) > 0) & (len(exact_matches) == 1) & (ignore_nearby_redshifts is False) + & (overwrite is False) ): entry = close_matches[0] diff --git a/halotools/sim_manager/tests/test_download_manager.py b/halotools/sim_manager/tests/test_download_manager.py index e620f4bd2..d437687ff 100644 --- a/halotools/sim_manager/tests/test_download_manager.py +++ b/halotools/sim_manager/tests/test_download_manager.py @@ -437,10 +437,10 @@ def test_download_processed_halo_table5(self): version_name="halotools_v0p4", redshift=11.7, dz_tol=200, - overwrite=True, + overwrite=False, download_dirname="std_cache_loc", ) - substr = "the ``ignore_nearby_redshifts`` to True, or decrease ``dz_tol``" + substr = "you must set the ``overwrite`` keyword argument to True." assert substr in err.value.args[0] @pytest.mark.skipif("not APH_MACHINE")