11# -*- coding: utf-8 -*-
2- """Tests for vcfpy.header
3- """
2+ """Tests for vcfpy.header"""
43
54import sys
65
@@ -103,13 +102,11 @@ def test_header_alt_allele_header_line():
103102 )
104103 else :
105104 assert (
106- str (line1 )
107- == "AltAlleleHeaderLine('ALT', '<ID=DEL,Description=\" deletion\" >', "
105+ str (line1 ) == "AltAlleleHeaderLine('ALT', '<ID=DEL,Description=\" deletion\" >', "
108106 "{'ID': 'DEL', 'Description': 'deletion'})"
109107 )
110108 assert (
111- repr (line1 )
112- == "AltAlleleHeaderLine('ALT', '<ID=DEL,Description=\" deletion\" >', "
109+ repr (line1 ) == "AltAlleleHeaderLine('ALT', '<ID=DEL,Description=\" deletion\" >', "
113110 "{'ID': 'DEL', 'Description': 'deletion'})"
114111 )
115112 assert line1 .value == '<ID=DEL,Description="deletion">'
@@ -149,24 +146,20 @@ def test_header_filter_header_line():
149146 assert line1 != line3
150147 if sys .version_info < (3 , 6 ):
151148 assert (
152- str (line1 )
153- == "FilterHeaderLine('FILTER', '<ID=PASS,Description=\" All filters passed\" >', "
149+ str (line1 ) == "FilterHeaderLine('FILTER', '<ID=PASS,Description=\" All filters passed\" >', "
154150 "OrderedDict([('ID', 'PASS'), ('Description', 'All filters passed')]))"
155151 )
156152 assert (
157- repr (line1 )
158- == "FilterHeaderLine('FILTER', '<ID=PASS,Description=\" All filters passed\" >', "
153+ repr (line1 ) == "FilterHeaderLine('FILTER', '<ID=PASS,Description=\" All filters passed\" >', "
159154 "OrderedDict([('ID', 'PASS'), ('Description', 'All filters passed')]))"
160155 )
161156 else :
162157 assert (
163- str (line1 )
164- == "FilterHeaderLine('FILTER', '<ID=PASS,Description=\" All filters passed\" >', "
158+ str (line1 ) == "FilterHeaderLine('FILTER', '<ID=PASS,Description=\" All filters passed\" >', "
165159 "{'ID': 'PASS', 'Description': 'All filters passed'})"
166160 )
167161 assert (
168- repr (line1 )
169- == "FilterHeaderLine('FILTER', '<ID=PASS,Description=\" All filters passed\" >', "
162+ repr (line1 ) == "FilterHeaderLine('FILTER', '<ID=PASS,Description=\" All filters passed\" >', "
170163 "{'ID': 'PASS', 'Description': 'All filters passed'})"
171164 )
172165 assert line1 .value == '<ID=PASS,Description="All filters passed">'
@@ -183,13 +176,11 @@ def test_header_pedigree_header_line():
183176 assert line1 != line3
184177 if sys .version_info < (3 , 6 ):
185178 assert (
186- str (line1 )
187- == "PedigreeHeaderLine('PEDIGREE', '<ID=child,Father=father>', "
179+ str (line1 ) == "PedigreeHeaderLine('PEDIGREE', '<ID=child,Father=father>', "
188180 "OrderedDict([('ID', 'child'), ('Father', 'father')]))"
189181 )
190182 assert (
191- repr (line1 )
192- == "PedigreeHeaderLine('PEDIGREE', '<ID=child,Father=father>', "
183+ repr (line1 ) == "PedigreeHeaderLine('PEDIGREE', '<ID=child,Father=father>', "
193184 "OrderedDict([('ID', 'child'), ('Father', 'father')]))"
194185 )
195186 else :
@@ -239,13 +230,11 @@ def test_header_info_header_line():
239230 assert line1 != line3
240231 if sys .version_info < (3 , 6 ):
241232 assert (
242- str (line1 )
243- == "InfoHeaderLine('INFO', '<ID=SVTYPE,Number=1,Type=String>', "
233+ str (line1 ) == "InfoHeaderLine('INFO', '<ID=SVTYPE,Number=1,Type=String>', "
244234 "OrderedDict([('ID', 'SVTYPE'), ('Number', 1), ('Type', 'String')]))"
245235 )
246236 assert (
247- repr (line1 )
248- == "InfoHeaderLine('INFO', '<ID=SVTYPE,Number=1,Type=String>', "
237+ repr (line1 ) == "InfoHeaderLine('INFO', '<ID=SVTYPE,Number=1,Type=String>', "
249238 "OrderedDict([('ID', 'SVTYPE'), ('Number', 1), ('Type', 'String')]))"
250239 )
251240 else :
@@ -279,24 +268,20 @@ def test_header_format_header_line():
279268 assert line1 != line3
280269 if sys .version_info < (3 , 6 ):
281270 assert (
282- str (line1 )
283- == "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer>', "
271+ str (line1 ) == "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer>', "
284272 "OrderedDict([('ID', 'AD'), ('Number', 'R'), ('Type', 'Integer')]))"
285273 )
286274 assert (
287- repr (line1 )
288- == "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer>', "
275+ repr (line1 ) == "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer>', "
289276 "OrderedDict([('ID', 'AD'), ('Number', 'R'), ('Type', 'Integer')]))"
290277 )
291278 else :
292279 assert (
293- str (line1 )
294- == "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer,Description=\" Allelic depths\" >', "
280+ str (line1 ) == "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer,Description=\" Allelic depths\" >', "
295281 "{'ID': 'AD', 'Number': 'R', 'Type': 'Integer', 'Description': 'Allelic depths'})"
296282 )
297283 assert (
298- repr (line1 )
299- == "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer,Description=\" Allelic depths\" >', "
284+ repr (line1 ) == "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer,Description=\" Allelic depths\" >', "
300285 "{'ID': 'AD', 'Number': 'R', 'Type': 'Integer', 'Description': 'Allelic depths'})"
301286 )
302287 assert line1 .value == '<ID=AD,Number=R,Type=Integer,Description="Allelic depths">'
0 commit comments