Skip to content

Commit

Permalink
Merge pull request #13 from eastgenomics/DI-809_refactor
Browse files Browse the repository at this point in the history
DI-809 - test wording and formatting (#13)
  • Loading branch information
Yu-jinKim authored Sep 23, 2024
2 parents 14c8e32 + 0d9d066 commit ce77e5e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/test_vcf_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_aaf_calculated_correctly_for_hets_and_homs(self):
def test_x_chrom_variants_additionally_returned_separate(self):
"""
Test that X chromosome variants are correctly returned in a
separate keys but also contribute towards normal het hom
separate keys and do not contribute towards normal het hom
counts
Expected chromosome 1 variant values:
Expand Down Expand Up @@ -219,14 +219,14 @@ def test_multi_sample_vcf_raises_assertion_error(self):

match = "more than one sample present in vcf"
with pytest.raises(AssertionError, match=match):
calculated_values = vcf_qc.get_het_hom_counts(
vcf_qc.get_het_hom_counts(
os.path.join(TEST_DATA_DIR, "multi_sample.vcf")
)

def test_variants_with_missing_fields_skipped(self):
"""
Variants with any GT, AD or DP should be skipped, test using
vcf with a variant with missing fields are skipped
Variants with any missing GT, AD or DP should be skipped, test
using vcf with a variant with missing fields is skipped
"""
expected_warning = (
"WARNING - One or more required fields are not present: ['AD']. "
Expand Down Expand Up @@ -323,7 +323,6 @@ def test_none_values_returned_if_missing_het_or_hom_counts(self):
@patch("src.vcf_qc.dxpy.describe", return_value={"name": "sample1.vcf"})
@patch("src.vcf_qc.dxpy.bindings.dxfile_functions.download_dxfile")
class TestDownloadInputFile(unittest.TestCase):

def test_remote_filename_returned(self, mock_download, mock_describe):
self.assertEqual(vcf_qc.download_input_file("file-xxx"), "sample1.vcf")

Expand Down

0 comments on commit ce77e5e

Please sign in to comment.