<commit_before>from gtfparse import parse_gtf_lines
from nose.tools import eq_

# failing example from https://github.com/openvax/gtfparse/issues/2
GTF_LINES = [
    """1\tprotein_coding\texon\t860260\t860328\t.\t+\t.\t"""
    """gene_id "ENSG00000187634"; transcript_id "ENST00000420190"; """
    """exon_number "1"; gene_name "SAMD11"; gene_source "ensembl_havana"; """
    """gene_biotype "protein_coding"; transcript_name "SAMD11-011"; """
    """transcript_source "havana"; exon_id "ENSE00001637883"; """
    """tag "cds_end_NF"; tag "mRNA_end_NF"; """
]

def test_parse_tag_attributes():
    parsed = parse_gtf_lines(GTF_LINES)
    tag_column = parsed["tag"]
    eq_(len(tag_column), 1)
    tags = tag_column[0]
    eq_(tags, ['cds_end_NF', 'mRNA_end_NF'])<commit_msg>updated test to have str vs. list<commit_after>from gtfparse import parse_gtf_lines
from nose.tools import eq_

# failing example from https://github.com/openvax/gtfparse/issues/2
GTF_LINES = [
    """1\tprotein_coding\texon\t860260\t860328\t.\t+\t.\t"""
    """gene_id "ENSG00000187634"; transcript_id "ENST00000420190"; """
    """exon_number "1"; gene_name "SAMD11"; gene_source "ensembl_havana"; """
    """gene_biotype "protein_coding"; transcript_name "SAMD11-011"; """
    """transcript_source "havana"; exon_id "ENSE00001637883"; """
    """tag "cds_end_NF"; tag "mRNA_end_NF"; """
]

def test_parse_tag_attributes():
    parsed = parse_gtf_lines(GTF_LINES)
    tag_column = parsed["tag"]
    eq_(len(tag_column), 1)
    tags = tag_column[0]
    eq_(tags, 'cds_end_NF,mRNA_end_NF')
{'fraction_non_alphanumeric': 0.15930902111324377, 'fraction_numerical': 0.07293666026871401, 'mean_word_length': 5.085603112840467, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6978786', 'n_tokens_mistral': 689, 'n_tokens_neox': 592, 'n_words': 102}