<commit_before>from unittest import TestCase

import numpy as np
import pandas as pd

from rosie.irregular_companies_classifier import IrregularCompaniesClassifier


class TestIrregularCompaniesClassifier(TestCase):

    def setUp(self):
        self.dataset = pd.read_csv('tests/fixtures/irregular_companies_classifier.csv',
                                   dtype={'cnpj': np.str})
        self.subject = IrregularCompaniesClassifier()

    def test_is_regular_company(self):
        self.assertEqual(self.subject.predict(self.dataset)[0], False)

    def test_is_irregular_company_BAIXADA(self):
        self.assertEqual(self.subject.predict(self.dataset)[1], True)

    def test_is_irregular_company_NULA(self):
        self.assertEqual(self.subject.predict(self.dataset)[2], True)

    def test_is_irregular_company_INAPTA(self):
        self.assertEqual(self.subject.predict(self.dataset)[3], True)

    def test_is_irregular_company_SUSPENSA(self):
        self.assertEqual(self.subject.predict(self.dataset)[4], True)

    def test_is_valid_reimbursement_based_on_date(self):
        self.assertEqual(self.subject.predict(self.dataset)[5], False)


    def test_fit(self):
        self.assertEqual(self.subject.fit(self.dataset), self.subject)

    def test_transform(self):
        self.assertEqual(self.subject.transform(), self.subject)<commit_msg>removing extra line<commit_after>from unittest import TestCase

import numpy as np
import pandas as pd

from rosie.irregular_companies_classifier import IrregularCompaniesClassifier


class TestIrregularCompaniesClassifier(TestCase):

    def setUp(self):
        self.dataset = pd.read_csv('tests/fixtures/irregular_companies_classifier.csv',
                                   dtype={'cnpj': np.str})
        self.subject = IrregularCompaniesClassifier()

    def test_is_regular_company(self):
        self.assertEqual(self.subject.predict(self.dataset)[0], False)

    def test_is_irregular_company_BAIXADA(self):
        self.assertEqual(self.subject.predict(self.dataset)[1], True)

    def test_is_irregular_company_NULA(self):
        self.assertEqual(self.subject.predict(self.dataset)[2], True)

    def test_is_irregular_company_INAPTA(self):
        self.assertEqual(self.subject.predict(self.dataset)[3], True)

    def test_is_irregular_company_SUSPENSA(self):
        self.assertEqual(self.subject.predict(self.dataset)[4], True)

    def test_is_valid_reimbursement_based_on_date(self):
        self.assertEqual(self.subject.predict(self.dataset)[5], False)

    def test_fit(self):
        self.assertEqual(self.subject.fit(self.dataset), self.subject)

    def test_transform(self):
        self.assertEqual(self.subject.transform(), self.subject)
{'fraction_non_alphanumeric': 0.10348623853211009, 'fraction_numerical': 0.004403669724770643, 'mean_word_length': 4.12406015037594, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6097890', 'n_tokens_mistral': 853, 'n_tokens_neox': 812, 'n_words': 117}