diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ef51b9962..a129fa81b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Improved container image resolution and prioritization of http downloads over Docker URIs ([#2364](https://github.com/nf-core/tools/pull/2364)). - Registries provided with `-l`/`--container-library` will be ignored for modules with explicit container registry specifications ([#2403](https://github.com/nf-core/tools/pull/2403)). +- Fix unintentional downloading of containers in test for the Tower download functionality. Bug reported by @adamrtalbot and @awgymer ([#2434](https://github.com/nf-core/tools/pull/2434)). ### Linting diff --git a/tests/test_download.py b/tests/test_download.py index dfd78adcfb..ee0744f660 100644 --- a/tests/test_download.py +++ b/tests/test_download.py @@ -402,7 +402,8 @@ def test_download_workflow_with_success(self, tmp_dir, mock_download_image, mock # Test Download for Tower # @with_temporary_folder - def test_download_workflow_for_tower(self, tmp_dir): + @mock.patch("nf_core.download.DownloadWorkflow.get_singularity_images") + def test_download_workflow_for_tower(self, tmp_dir, _): download_obj = DownloadWorkflow( pipeline="nf-core/rnaseq", revision=("3.7", "3.9"), @@ -451,11 +452,6 @@ def test_download_workflow_for_tower(self, tmp_dir): # download_obj.download_workflow_tower(location=tmp_dir) will run container image detection for all requested revisions assert isinstance(download_obj.containers, list) and len(download_obj.containers) == 33 - # manually test container image detection for 3.7 revision only - download_obj.containers = [] # empty container list for the test - download_obj.workflow_repo.checkout(download_obj.wf_sha["3.7"]) - download_obj.find_container_images(download_obj.workflow_repo.access()) - assert len(download_obj.containers) == 30 # 30 containers for 3.7 assert ( "https://depot.galaxyproject.org/singularity/bbmap:38.93--he522d1c_0" in download_obj.containers ) # direct definition