From 0078be5114c9b8ab718421b1efdaf7d74b4605bd Mon Sep 17 00:00:00 2001 From: Jethro Rainford Date: Mon, 23 Sep 2024 09:27:44 +0100 Subject: [PATCH] fix tests from output filename change --- tests/test_vcf_qc.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_vcf_qc.py b/tests/test_vcf_qc.py index a6a8f0e..fa80c61 100644 --- a/tests/test_vcf_qc.py +++ b/tests/test_vcf_qc.py @@ -345,9 +345,9 @@ def test_output_file_contents_correctly_written(self): "x_het_hom_ratio": None, } - vcf_qc.write_output_file(outfile="test.vcf.qc", ratios=ratios) + vcf_qc.write_output_file(outfile="test.vcf.QC", ratios=ratios) - with open("test.vcf.qc", "r") as fh: + with open("test.vcf.QC", "r") as fh: written_contents = fh.readlines() expected_contents = [ @@ -355,7 +355,7 @@ def test_output_file_contents_correctly_written(self): "0.5000\t0.9900\t0.6000\tNone\n", ] - os.remove("test.vcf.qc") + os.remove("test.vcf.QC") self.assertEqual(written_contents, expected_contents) @@ -368,10 +368,10 @@ def test_upload_params_correct(self, mock_job, mock_upload): "folder": "/output/sub_folder" } - vcf_qc.upload_output_file("test.vcf.qc") + vcf_qc.upload_output_file("test.vcf.QC") expected_args = { - "filename": "test.vcf.qc", + "filename": "test.vcf.QC", "folder": "/output/sub_folder", "wait_on_close": True, } @@ -382,7 +382,7 @@ def test_expected_dxlink_format_returned(self, mock_job, mock_upload): mock_upload.return_value = "file-xxx" self.assertEqual( - vcf_qc.upload_output_file("test.vcf.qc"), + vcf_qc.upload_output_file("test.vcf.QC"), {"output_file": {"$dnanexus_link": "file-xxx"}}, ) @@ -495,7 +495,7 @@ def test_running_in_dnanexus_calls_download_upload_functions( self.mock_write_output_file.assert_called_once() with self.subTest("outfile name correct"): - output_file = f"{self.test_vcf}.qc" + output_file = f"{self.test_vcf}.QC" assert ( output_file