diff --git a/preprocessor/tests/test_utilities.py b/preprocessor/tests/test_utilities.py index fb1ffaf2..4efdc5d3 100644 --- a/preprocessor/tests/test_utilities.py +++ b/preprocessor/tests/test_utilities.py @@ -411,16 +411,11 @@ def test_prep_pharmcat_positions(): assert tmp_uniallelic.is_file() assert uniallelic_mtime == tmp_uniallelic.stat().st_mtime - # check whether the uniallelic position file has the same number of positions as the position file - uniallelic_file_lines = helpers.read_vcf(helpers.uniallelic_pharmcat_positions_file, bgzipped=True).split('\n') - n_uniallelic_file_lines: int = len(uniallelic_file_lines) - # note that tmp_uniallelic is the equivalent uniallelic file generated from the pharmcat position file - tmp_uniallelic_lines = helpers.read_vcf(tmp_uniallelic, bgzipped=True).split('\n') - n_tmp_uniallelic_lines: int = len(tmp_uniallelic_lines) - # uniallelic_pharmcat_positions_file should - # have the same number of lines as its equivalent file generated from the pharmcat position file - assert n_uniallelic_file_lines == n_tmp_uniallelic_lines, \ - 'mismatching numbers of positions between %s and %s' % \ + # check whether the uniallelic position file has the same file content as the position file + uniallelic_file_lines = helpers.read_vcf(helpers.uniallelic_pharmcat_positions_file, bgzipped=True) + tmp_uniallelic_lines = helpers.read_vcf(tmp_uniallelic, bgzipped=True) + assert uniallelic_file_lines == tmp_uniallelic_lines, \ + 'mismatching positions between %s and %s' % \ (helpers.uniallelic_pharmcat_positions_file.name, helpers.pharmcat_positions_file.name)