diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 70b81fcb..1b698655 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -19,7 +19,7 @@ requirements: - gridss - insilicoseq - mason - - megahit ==1.2.9 + - megahit {{ megahit }} - pysam {{ pysam }} - qiime2 >={{ qiime2 }} - q2-fondue >={{ q2_fondue }} diff --git a/q2_assembly/iss/tests/test_iss.py b/q2_assembly/iss/tests/test_iss.py index bf90320c..8dac6187 100644 --- a/q2_assembly/iss/tests/test_iss.py +++ b/q2_assembly/iss/tests/test_iss.py @@ -127,7 +127,7 @@ def test_rename_reads(self, p): self.assertListEqual(obs_reads, exp_reads) @patch("subprocess.run") - @patch("q2_assembly.iss._rename_reads_files") + @patch("q2_assembly.iss.iss._rename_reads_files") def test_generate_reads(self, p1, p2): samples = ["samp1", "samp2"] result_fp = "/there" @@ -170,7 +170,7 @@ def test_generate_reads_duplicated_samples(self): generate_reads(sample_names=["s1", "s2", "s3", "s1", "s2"]) @patch("shutil.move") - @patch("q2_assembly.iss._generate_reads") + @patch("q2_assembly.iss.iss._generate_reads") @patch("tempfile.TemporaryDirectory") def test_generate_reads_action(self, p1, p2, p3): test_temp_dir = MockTempDir() diff --git a/q2_assembly/mason/tests/test_mason.py b/q2_assembly/mason/tests/test_mason.py index 8c273dc9..18d52ac7 100644 --- a/q2_assembly/mason/tests/test_mason.py +++ b/q2_assembly/mason/tests/test_mason.py @@ -54,7 +54,7 @@ def test_process_mason_arg_bool(self): exp = ["--k_bool"] self.assertListEqual(obs, exp) - @patch("q2_assembly.mason._process_sample") + @patch("q2_assembly.mason.mason._process_sample") def test_simulate_reads_mason_helper(self, p_process): mock_genomes_dir_fmt = GenomeSequencesDirectoryFormat() @@ -63,7 +63,7 @@ def test_simulate_reads_mason_helper(self, p_process): ) with patch( - "q2_assembly.mason.GenomeSequencesDirectoryFormat", + "q2_assembly.mason.mason.GenomeSequencesDirectoryFormat", return_value=mock_genomes_dir_fmt, ): result = _simulate_reads_mason( @@ -332,8 +332,8 @@ def test_combine_reads(self): self.assertFalse(os.path.exists(f1)) self.assertFalse(os.path.exists(f2)) - @patch("q2_assembly.mason.run_command") - @patch("q2_assembly.mason._combine_reads") + @patch("q2_assembly.mason.mason.run_command") + @patch("q2_assembly.mason.mason._combine_reads") def test_process_sample(self, mock_combine_reads, mock_run_command): sample = "sampleY" genome_files = ["/tmp/genome1.fasta", "/tmp/genome2.fasta"] diff --git a/q2_assembly/megahit/tests/test_megahit.py b/q2_assembly/megahit/tests/test_megahit.py index b52fb1b0..4d38f523 100644 --- a/q2_assembly/megahit/tests/test_megahit.py +++ b/q2_assembly/megahit/tests/test_megahit.py @@ -257,8 +257,8 @@ def test_process_sample_with_error(self, p1, p2): "test_sample", "fwd_reads.fastq.gz", None, self.fake_common_args, result ) - @patch("q2_assembly.megahit.modify_contig_ids") - @patch("q2_assembly.megahit._process_sample") + @patch("q2_assembly.megahit.megahit.modify_contig_ids") + @patch("q2_assembly.megahit.megahit._process_sample") def test_assemble_megahit_paired(self, p1, p2): input_files = self.get_data_path("reads/paired-end") input = SingleLanePerSamplePairedEndFastqDirFmt(input_files, mode="r") @@ -274,10 +274,14 @@ def test_assemble_megahit_paired(self, p1, p2): ) p1.assert_has_calls(exp_calls, any_order=False) + p2.assert_has_calls( + [call(os.path.join(str(obs), f"sample1_contigs.fa"), "sample1", "shortuuid"), + call(os.path.join(str(obs), f"sample2_contigs.fa"), "sample2", "shortuuid")] + ) self.assertIsInstance(obs, ContigSequencesDirFmt) - @patch("q2_assembly.megahit.modify_contig_ids") - @patch("q2_assembly.megahit._process_sample") + @patch("q2_assembly.megahit.megahit.modify_contig_ids") + @patch("q2_assembly.megahit.megahit._process_sample") def test_assemble_megahit_single(self, p1, p2): input_files = self.get_data_path("reads/single-end") input = SingleLanePerSampleSingleEndFastqDirFmt(input_files, mode="r") @@ -293,10 +297,14 @@ def test_assemble_megahit_single(self, p1, p2): ) p1.assert_has_calls(exp_calls, any_order=False) + p2.assert_has_calls( + [call(os.path.join(str(obs), f"sample1_contigs.fa"), "sample1", "shortuuid"), + call(os.path.join(str(obs), f"sample2_contigs.fa"), "sample2", "shortuuid")] + ) self.assertIsInstance(obs, ContigSequencesDirFmt) - @patch("q2_assembly.megahit.modify_contig_ids") - @patch("q2_assembly.megahit._process_sample") + @patch("q2_assembly.megahit.megahit.modify_contig_ids") + @patch("q2_assembly.megahit.megahit._process_sample") def test_assemble_megahit_paired_coassemble(self, p1, p2): input_files = self.get_data_path("reads/paired-end") input = SingleLanePerSamplePairedEndFastqDirFmt(input_files, mode="r") @@ -312,11 +320,11 @@ def test_assemble_megahit_paired_coassemble(self, p1, p2): ) p1.assert_has_calls(exp_calls, any_order=False) - p2.assert_has_calls([call(ANY, "all_contigs", "shortuuid")]) + p2.assert_has_calls([call(os.path.join(str(obs), f"all_contigs.fa"), "all_contigs", "shortuuid")]) self.assertIsInstance(obs, ContigSequencesDirFmt) - @patch("q2_assembly.megahit.modify_contig_ids") - @patch("q2_assembly.megahit._process_sample") + @patch("q2_assembly.megahit.megahit.modify_contig_ids") + @patch("q2_assembly.megahit.megahit._process_sample") def test_assemble_megahit_single_coassemble(self, p1, p2): input_files = self.get_data_path("reads/single-end") input = SingleLanePerSampleSingleEndFastqDirFmt(input_files, mode="r") @@ -332,11 +340,11 @@ def test_assemble_megahit_single_coassemble(self, p1, p2): ) p1.assert_has_calls(exp_calls, any_order=False) - p2.assert_has_calls([call(ANY, "all_contigs", "shortuuid")]) + p2.assert_has_calls([call(os.path.join(str(obs), f"all_contigs.fa"), "all_contigs", "shortuuid")]) self.assertIsInstance(obs, ContigSequencesDirFmt) - @patch("q2_assembly.megahit.modify_contig_ids") - @patch("q2_assembly.megahit._process_sample") + @patch("q2_assembly.megahit.megahit.modify_contig_ids") + @patch("q2_assembly.megahit.megahit._process_sample") def test_assemble_megahit_paired_single_sample_coassemble(self, p1, p2): input_files = self.get_data_path("reads/single-sample/paired-end") input = SingleLanePerSamplePairedEndFastqDirFmt(input_files, mode="r") @@ -352,11 +360,11 @@ def test_assemble_megahit_paired_single_sample_coassemble(self, p1, p2): ) p1.assert_has_calls(exp_calls, any_order=False) - p2.assert_has_calls([call(ANY, "all_contigs", "shortuuid")]) + p2.assert_has_calls([call(os.path.join(str(obs), f"all_contigs.fa"), "all_contigs", "shortuuid")]) self.assertIsInstance(obs, ContigSequencesDirFmt) - @patch("q2_assembly.megahit.modify_contig_ids") - @patch("q2_assembly.megahit._process_sample") + @patch("q2_assembly.megahit.megahit.modify_contig_ids") + @patch("q2_assembly.megahit.megahit._process_sample") def test_assemble_megahit_single_single_sample_coassemble(self, p1, p2): input_files = self.get_data_path("reads/single-sample/single-end") input = SingleLanePerSampleSingleEndFastqDirFmt(input_files, mode="r") @@ -372,12 +380,11 @@ def test_assemble_megahit_single_single_sample_coassemble(self, p1, p2): ) p1.assert_has_calls(exp_calls, any_order=False) - p2.assert_has_calls([call(ANY, "all_contigs", "shortuuid")]) + p2.assert_has_calls([call(os.path.join(str(obs), f"all_contigs.fa"), "all_contigs", "shortuuid")]) self.assertIsInstance(obs, ContigSequencesDirFmt) - @patch("q2_assembly.megahit.modify_contig_ids") - @patch("q2_assembly.megahit.assemble_megahit_helper") - def test_assemble_megahit_process_params(self, p1, p2): + @patch("q2_assembly.megahit.megahit.assemble_megahit_helper") + def test_assemble_megahit_process_params(self, p1): input_files = self.get_data_path("reads/single-end") input = SingleLanePerSampleSingleEndFastqDirFmt(input_files, mode="r") @@ -446,13 +453,13 @@ def test_assemble_megahit_parallel_single(self): self.assertIs(out.format, ContigSequencesDirFmt) @parameterized.expand([("shortuuid",), ("uuid3",), ("uuid4",), ("uuid5",)]) - @patch("q2_assembly.megahit.modify_contig_ids") - @patch("q2_assembly.megahit._process_sample") + @patch("q2_assembly.megahit.megahit.modify_contig_ids") + @patch("q2_assembly.megahit.megahit._process_sample") def test_assemble_megahit_different_uuids(self, uuid_type, p1, p2): input_files = self.get_data_path("reads/single-end") input = SingleLanePerSampleSingleEndFastqDirFmt(input_files, mode="r") - _ = assemble_megahit_helper( + obs = assemble_megahit_helper( reads=input, coassemble=False, uuid_type=uuid_type, @@ -460,7 +467,7 @@ def test_assemble_megahit_different_uuids(self, uuid_type, p1, p2): ) p2.assert_has_calls( - [call(ANY, "sample1", uuid_type), call(ANY, "sample2", uuid_type)] + [call(os.path.join(str(obs), f"sample1_contigs.fa"), "sample1", uuid_type), call(os.path.join(str(obs), f"sample2_contigs.fa"), "sample2", uuid_type)] ) diff --git a/q2_assembly/quast/tests/test_quast.py b/q2_assembly/quast/tests/test_quast.py index 687cd3d9..c64e9c53 100644 --- a/q2_assembly/quast/tests/test_quast.py +++ b/q2_assembly/quast/tests/test_quast.py @@ -437,10 +437,12 @@ def test_evaluate_quast_with_refs(self, p1): self.assertListEqual(obs_samples, ["sample1", "sample2"]) p1.assert_called_once_with(exp_command, check=True) - @patch("q2_assembly.quast._create_tabular_results") + @patch("q2_assembly.quast.quast._create_tabular_results") @patch("platform.system", return_value="Linux") - @patch("q2_assembly.quast._evaluate_quast", return_value=["sample1", "sample2"]) - @patch("q2_assembly.quast._fix_html_reports", return_value=None) + @patch( + "q2_assembly.quast.quast._evaluate_quast", return_value=["sample1", "sample2"] + ) + @patch("q2_assembly.quast.quast._fix_html_reports", return_value=None) @patch("q2templates.render") @patch("tempfile.TemporaryDirectory") def test_visualize_quast_action_no_reads(self, p1, p2, p3, p4, p5, p6): @@ -500,9 +502,11 @@ def test_visualize_quast_action_no_reads(self, p1, p2, p3, p4, p5, p6): } p2.assert_called_once_with(ANY, self._tmp, context=exp_context) - @patch("q2_assembly.quast._create_tabular_results") - @patch("q2_assembly.quast._evaluate_quast", return_value=["sample1", "sample2"]) - @patch("q2_assembly.quast._fix_html_reports", return_value=None) + @patch("q2_assembly.quast.quast._create_tabular_results") + @patch( + "q2_assembly.quast.quast._evaluate_quast", return_value=["sample1", "sample2"] + ) + @patch("q2_assembly.quast.quast._fix_html_reports", return_value=None) @patch("q2templates.render") @patch("tempfile.TemporaryDirectory") def test_visualize_quast_action_single_end(self, p1, p2, p3, p4, p5): @@ -577,9 +581,11 @@ def test_visualize_quast_action_single_end(self, p1, p2, p3, p4, p5): } p2.assert_called_once_with(ANY, self._tmp, context=exp_context) - @patch("q2_assembly.quast._create_tabular_results") - @patch("q2_assembly.quast._evaluate_quast", return_value=["sample1", "sample2"]) - @patch("q2_assembly.quast._fix_html_reports", return_value=None) + @patch("q2_assembly.quast.quast._create_tabular_results") + @patch( + "q2_assembly.quast.quast._evaluate_quast", return_value=["sample1", "sample2"] + ) + @patch("q2_assembly.quast.quast._fix_html_reports", return_value=None) @patch("q2templates.render") @patch("tempfile.TemporaryDirectory") def test_visualize_quast_action_paired_end(self, p1, p2, p3, p4, p5): @@ -652,9 +658,11 @@ def test_visualize_quast_action_paired_end(self, p1, p2, p3, p4, p5): } p2.assert_called_once_with(ANY, self._tmp, context=exp_context) - @patch("q2_assembly.quast._create_tabular_results") - @patch("q2_assembly.quast._evaluate_quast", return_value=["sample1", "sample2"]) - @patch("q2_assembly.quast._fix_html_reports", return_value=None) + @patch("q2_assembly.quast.quast._create_tabular_results") + @patch( + "q2_assembly.quast.quast._evaluate_quast", return_value=["sample1", "sample2"] + ) + @patch("q2_assembly.quast.quast._fix_html_reports", return_value=None) @patch("q2templates.render") @patch("tempfile.TemporaryDirectory") def test_evaluate_quast_action_paired_end_no_icarus(self, p1, p2, p3, p4, p5): @@ -726,7 +734,7 @@ def test_evaluate_quast_action_paired_end_no_icarus(self, p1, p2, p3, p4, p5): p2.assert_called_once_with(ANY, self._tmp, context=exp_context) @patch("pandas.read_csv") - @patch("q2_assembly.quast._parse_columns") + @patch("q2_assembly.quast.quast._parse_columns") def test_create_tabular_results(self, p1, p2): report_path = os.path.join(self.temp_dir.name, "transposed_report.tsv") mock_df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]}) @@ -738,7 +746,7 @@ def test_create_tabular_results(self, p1, p2): p1.assert_called_once_with(mock_df, [1000, 5000, 25000, 50000]) @patch("pandas.read_csv") - @patch("q2_assembly.quast._parse_columns") + @patch("q2_assembly.quast.quast._parse_columns") def test_create_tabular_results_in_combined_subdir(self, p1, p2): report_path = os.path.join( self.temp_dir.name, "combined_reference", "transposed_report.tsv" @@ -822,7 +830,7 @@ def test_evaluate_quast_pipeline_no_refs_normal(self): action, export_data, make_artifact, mock_ctx = self.create_mock_ctx() with patch( - "q2_assembly.quast.GenomeSequencesDirectoryFormat" + "q2_types.genome_data.GenomeSequencesDirectoryFormat" ) as MockGenomeSequencesDirectoryFormat: MockGenomeSequencesDirectoryFormat.return_value = ( GenomeSequencesDirectoryFormat( @@ -853,7 +861,7 @@ def test_evaluate_quast_pipeline_no_refs_no_downloaded_genomes(self): action, export_data, make_artifact, mock_ctx = self.create_mock_ctx() with patch( - "q2_assembly.quast.GenomeSequencesDirectoryFormat" + "q2_types.genome_data.GenomeSequencesDirectoryFormat" ) as MockGenomeSequencesDirectoryFormat: with warnings.catch_warnings(record=True) as w: @@ -892,7 +900,7 @@ def test_evaluate_quast_pipeline_no_refs_corrupt_files(self): mock_temp_dir.return_value.__enter__.return_value = tmp action, export_data, make_artifact, mock_ctx = self.create_mock_ctx() with patch( - "q2_assembly.quast.GenomeSequencesDirectoryFormat" + "q2_assembly.quast.quast.GenomeSequencesDirectoryFormat" ) as MockGenomeSequencesDirectoryFormat: with warnings.catch_warnings(record=True) as w: # corrupt file diff --git a/q2_assembly/spades/tests/test_spades.py b/q2_assembly/spades/tests/test_spades.py index 8495aba0..04a0378f 100644 --- a/q2_assembly/spades/tests/test_spades.py +++ b/q2_assembly/spades/tests/test_spades.py @@ -208,8 +208,8 @@ def test_process_sample_with_error(self, p1, p2): "test_sample", "fwd_reads.fastq.gz", None, self.fake_common_args, result ) - @patch("q2_assembly.spades.modify_contig_ids") - @patch("q2_assembly.spades._process_sample") + @patch("q2_assembly.spades.spades.modify_contig_ids") + @patch("q2_assembly.spades.spades._process_sample") def test_assemble_spades_paired(self, p1, p2): input_files = self.get_data_path("reads/paired-end") input = SingleLanePerSamplePairedEndFastqDirFmt(input_files, mode="r") @@ -223,15 +223,29 @@ def test_assemble_spades_paired(self, p1, p2): exp_calls = self.generate_exp_calls(sample_ids=(1, 2), kind="paired") p1.assert_has_calls(exp_calls, any_order=False) + p2.assert_has_calls( + [ + call( + os.path.join(str(obs), f"sample1_contigs.fa"), + "sample1", + "shortuuid", + ), + call( + os.path.join(str(obs), f"sample2_contigs.fa"), + "sample2", + "shortuuid", + ), + ] + ) self.assertIsInstance(obs, ContigSequencesDirFmt) - @patch("q2_assembly.spades.modify_contig_ids") - @patch("q2_assembly.spades.concatenate_files") + @patch("q2_assembly.spades.spades.modify_contig_ids") + @patch("q2_assembly.spades.spades.concatenate_files") @patch( "tempfile.TemporaryDirectory", return_value=MagicMock(__enter__=MagicMock(return_value="/tmp/mock_tmp_dir")), ) - @patch("q2_assembly.spades._process_sample") + @patch("q2_assembly.spades.spades._process_sample") def test_assemble_spades_paired_coassemble(self, p1, p2, p3, p4): input_files = self.get_data_path("reads/paired-end") input = SingleLanePerSamplePairedEndFastqDirFmt(input_files, mode="r") @@ -250,16 +264,18 @@ def test_assemble_spades_paired_coassemble(self, p1, p2, p3, p4): exp_calls = [call("all_contigs", fwd, rev, self.test_params_list, ANY)] p1.assert_has_calls(exp_calls, any_order=False) - p4.assert_has_calls([call(ANY, "all_contigs", "shortuuid")]) + p4.assert_has_calls( + [call(os.path.join(str(obs), "all_contigs.fa"), "all_contigs", "shortuuid")] + ) self.assertIsInstance(obs, ContigSequencesDirFmt) - @patch("q2_assembly.spades.modify_contig_ids") - @patch("q2_assembly.spades.concatenate_files") + @patch("q2_assembly.spades.spades.modify_contig_ids") + @patch("q2_assembly.spades.spades.concatenate_files") @patch( "tempfile.TemporaryDirectory", return_value=MagicMock(__enter__=MagicMock(return_value="/tmp/mock_tmp_dir")), ) - @patch("q2_assembly.spades._process_sample") + @patch("q2_assembly.spades.spades._process_sample") def test_assemble_spades_paired_single_sample_coassemble(self, p1, p2, p3, p4): input_files = self.get_data_path("reads/single-sample/paired-end") input = SingleLanePerSamplePairedEndFastqDirFmt(input_files, mode="r") @@ -279,10 +295,12 @@ def test_assemble_spades_paired_single_sample_coassemble(self, p1, p2, p3, p4): exp_calls = [call("all_contigs", fwd, rev, self.test_params_list, ANY)] p1.assert_has_calls(exp_calls, any_order=False) - p4.assert_has_calls([call(ANY, "all_contigs", "shortuuid")]) + p4.assert_has_calls( + [call(os.path.join(str(obs), "all_contigs.fa"), "all_contigs", "shortuuid")] + ) self.assertIsInstance(obs, ContigSequencesDirFmt) - @patch("q2_assembly.spades._process_sample") + @patch("q2_assembly.spades.spades._process_sample") def test_assemble_spades_single(self, p): input_files = self.get_data_path("reads/single-end") input = SingleLanePerSampleSingleEndFastqDirFmt(input_files, mode="r") @@ -297,8 +315,8 @@ def test_assemble_spades_single(self, p): common_args=self.test_params_list, ) - @patch("q2_assembly.spades.modify_contig_ids") - @patch("q2_assembly.spades._process_sample") + @patch("q2_assembly.spades.spades.modify_contig_ids") + @patch("q2_assembly.spades.spades._process_sample") def test_assemble_spades_single_coassemble(self, p1, p2): input_files = self.get_data_path("reads/single-end") input = SingleLanePerSampleSingleEndFastqDirFmt(input_files, mode="r") @@ -315,8 +333,8 @@ def test_assemble_spades_single_coassemble(self, p1, p2): ) p2.assert_not_called() - @patch("q2_assembly.spades.modify_contig_ids") - @patch("q2_assembly.spades._process_sample") + @patch("q2_assembly.spades.spades.modify_contig_ids") + @patch("q2_assembly.spades.spades._process_sample") def test_assemble_spades_single_single_sample_coassemble(self, p1, p2): input_files = self.get_data_path("reads/single-sample/single-end") input = SingleLanePerSampleSingleEndFastqDirFmt(input_files, mode="r") @@ -333,8 +351,8 @@ def test_assemble_spades_single_single_sample_coassemble(self, p1, p2): ) p2.assert_not_called() - @patch("q2_assembly.spades.modify_contig_ids") - @patch("q2_assembly.spades._assemble_spades") + @patch("q2_assembly.spades.spades.modify_contig_ids") + @patch("q2_assembly.spades.spades._assemble_spades") def test_assemble_spades_process_params(self, p1, p2): input_files = self.get_data_path("reads/single-end") input = SingleLanePerSampleSingleEndFastqDirFmt(input_files, mode="r") @@ -362,13 +380,13 @@ def test_assemble_spades_process_params(self, p1, p2): ) @parameterized.expand([("shortuuid",), ("uuid3",), ("uuid4",), ("uuid5",)]) - @patch("q2_assembly.spades.modify_contig_ids") - @patch("q2_assembly.spades._process_sample") + @patch("q2_assembly.spades.spades.modify_contig_ids") + @patch("q2_assembly.spades.spades._process_sample") def test_assemble_spades_different_uuids(self, uuid_type, p1, p2): input_files = self.get_data_path("reads/single-end") input = SingleLanePerSampleSingleEndFastqDirFmt(input_files, mode="r") - _assemble_spades( + obs = _assemble_spades( reads=input, meta=False, coassemble=False, @@ -377,7 +395,14 @@ def test_assemble_spades_different_uuids(self, uuid_type, p1, p2): ) p2.assert_has_calls( - [call(ANY, "sample1", uuid_type), call(ANY, "sample2", uuid_type)] + [ + call( + os.path.join(str(obs), "sample1_contigs.fa"), "sample1", uuid_type + ), + call( + os.path.join(str(obs), "sample2_contigs.fa"), "sample2", uuid_type + ), + ] ) diff --git a/q2_assembly/tests/test_helpers.py b/q2_assembly/tests/test_helpers.py index 305b8567..fa92ff79 100644 --- a/q2_assembly/tests/test_helpers.py +++ b/q2_assembly/tests/test_helpers.py @@ -101,7 +101,7 @@ def test_collate_genomes_dnafastaformat(self, input): expected_desc = content[expected_id]["description"] expected_sequence = content[expected_id]["sequence"] - self.assertEquals(actual_id, expected_id) + self.assertEqual(actual_id, expected_id) self.assertEqual(actual_description, expected_desc) self.assertEqual(actual_sequence, expected_sequence) @@ -174,7 +174,7 @@ def test_collate_genomes_dnafastaformat_multiple_duplicates_warn(self, dir_fmt): expected_desc = content[expected_id]["description"] expected_sequence = content[expected_id]["sequence"] - self.assertEquals(actual_id, expected_id) + self.assertEqual(actual_id, expected_id) self.assertEqual(actual_description, expected_desc) self.assertEqual(actual_sequence, expected_sequence) @@ -238,7 +238,7 @@ def test_rename_contigs(self, uuid_type, regex): self.assertTrue(all(regex.match(new_id) for new_id in new_contig_ids)) @parameterized.expand(["shortuuid", "uuid3", "uuid4", "uuid5"]) - @patch("q2_assembly.helpers.modify_contig_ids") + @patch("q2_assembly.helpers.helpers.modify_contig_ids") def test_rename_contigs_method_call(self, uuid_type, p1): contigs = ContigSequencesDirFmt(self.get_data_path("contigs"), "r") _ = rename_contigs(contigs, uuid_type)