def test_template_merge():
    template_1 = gt.Template()
    template_1.parse("A/1\tAAA\t###\t0\t-\n")
    template_2 = gt.Template()
    template_2.parse("A/1\tAAA\t###\t1\tchr1:+:50:3")
    template_1.merge(template_2)
    assert template_1.to_map(
    ) == "A/1\tAAA\t###\t1\tchr1:+:50:3", "Not '%s'" % template_1.to_map()
def test_template_to_sequence():
    template = gt.Template()
    template.parse("A/1\tAAA\t###\t0\t-\n")
    assert template.to_sequence(
    ) == "@A/1\nAAA\n+\n###", "Not '%s'" % template.to_sequence()
    template.parse("A/1\tAAA\t\t0\t-\n")
    assert template.to_fasta(
    ) == ">A/1\nAAA", "Not '%s'" % template.to_sequence()
def test_template_to_map():
    template = gt.Template()
    template.parse("A/1\tAAA\t\t0\t-\n")
    assert template.to_map(
    ) == "A/1\tAAA\t\t0\t-", "Not '%s'" % template.to_map()
def test_template_no_qualities():
    template = gt.Template()
    template.parse("A/1\tAAA\t\t0\t-\n")
    assert template.qualities == ""
def test_template_read():
    template = gt.Template()
    template.parse("A/1\tAAA\t###\t0\t-\n")
    assert template.read == "AAA"
def test_template_length():
    template = gt.Template()
    template.parse("A/1\tAAA\t###\t0\t-\n")
    assert template.length == 3
def test_template_map_parsing():
    template = gt.Template()
    template.parse("A/1\tAAA\t###\t0\t-\n")
    assert template.tag == "A"