<commit_before>from collections import defaultdict
import os
import unittest

from eva_cttv_pipeline import consequence_type as CT


class ProcessGeneTest(unittest.TestCase):
    def test__process_gene(self):
        test_consequence_type_dict = defaultdict(list)
        test_rs_id = "rs121912888"
        test_ensembl_gene_id = "ENSG00000139219"
        test_so_name = "missense_variant"

        test_consequence_type = CT.ConsequenceType(test_ensembl_gene_id, test_so_name)

        CT.process_gene(test_consequence_type_dict, test_rs_id, test_ensembl_gene_id, test_so_name)

        self.assertEqual(test_consequence_type_dict["rs121912888"][0], test_consequence_type)


class ProcessConsequenceTypeFileTsvTest(unittest.TestCase):
    def test__process_consequence_type_file_tsv(self):
        test_consequence_type = CT.ConsequenceType("ENSG00000021488", "missense_variant")
        snp_2_gene_file_path = os.path.join(os.path.dirname(__file__), 'resources',
                                      'coords_20170117_out_extract.tsv')
        consequence_type_dict, one_rs_multiple_genes = \
            CT.process_consequence_type_file_tsv(snp_2_gene_file_path)
        self.assertEqual(consequence_type_dict["rs121908485"][0], test_consequence_type)


class SoTermTest(unittest.TestCase):<commit_msg>Fixed test file string<commit_after>from collections import defaultdict
import os
import unittest

from eva_cttv_pipeline import consequence_type as CT
from tests import config


class ProcessGeneTest(unittest.TestCase):
    def test__process_gene(self):
        test_consequence_type_dict = defaultdict(list)
        test_rs_id = "rs121912888"
        test_ensembl_gene_id = "ENSG00000139219"
        test_so_name = "missense_variant"

        test_consequence_type = CT.ConsequenceType(test_ensembl_gene_id, test_so_name)

        CT.process_gene(test_consequence_type_dict, test_rs_id, test_ensembl_gene_id, test_so_name)

        self.assertEqual(test_consequence_type_dict["rs121912888"][0], test_consequence_type)


class ProcessConsequenceTypeFileTsvTest(unittest.TestCase):
    def test__process_consequence_type_file_tsv(self):
        test_consequence_type = CT.ConsequenceType("ENSG00000021488", "missense_variant")
        snp_2_gene_file_path = os.path.join(os.path.dirname(__file__), 'resources',
                                            config.snp_2_gene_file)
        consequence_type_dict, one_rs_multiple_genes = \
            CT.process_consequence_type_file_tsv(snp_2_gene_file_path)
        self.assertEqual(consequence_type_dict["rs121908485"][0], test_consequence_type)


class SoTermTest(unittest.TestCase):
{'fraction_non_alphanumeric': 0.07123910572186434, 'fraction_numerical': 0.04357711254262978, 'mean_word_length': 4.523012552301255, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1661216', 'n_tokens_mistral': 944, 'n_tokens_neox': 850, 'n_words': 112}