<commit_before>
import unittest
from cnab240.bancos import bb
from cnab240.tipos import EventoBase
from cnab240.eventos.cobranca import EventoInclusao
from tests.data import REGISTRO_T_DICT

class TestEvento(unittest.TestCase):
    def setUp(self):
        self.evento = EventoBase(bb)
   
    def test_getattributes(self):
        self.assertEquals(self.evento._segmentos, [])

        test_obj = type('TestObject', (object,), {'test_attr': None})()
        self.evento._segmentos.append(test_obj)
        test_obj.test_attr = 'Hello World'
        self.evento.test_attr = 'Goodbye World'

        self.assertNotEqual(self.evento.test_attr, 'Goodbye World')
        self.assertEqual(self.evento.test_attr, 'Hello World')

    def test_unicode(self):  
        self.assertEquals(unicode(self.evento), u'')
        self.evento._segmentos.append('test_1')
        self.assertEquals(unicode(self.evento), u'test_1') 
        self.evento._segmentos.append('test_2') 
        self.assertEquals(unicode(self.evento), u'test_1\ntest_2') 

<commit_msg>Removendo include desnecessario<commit_after>
import unittest
from cnab240.bancos import bb
from cnab240.tipos import EventoBase
from tests.data import REGISTRO_T_DICT

class TestEvento(unittest.TestCase):
    def setUp(self):
        self.evento = EventoBase(bb)
   
    def test_getattributes(self):
        self.assertEquals(self.evento._segmentos, [])

        test_obj = type('TestObject', (object,), {'test_attr': None})()
        self.evento._segmentos.append(test_obj)
        test_obj.test_attr = 'Hello World'
        self.evento.test_attr = 'Goodbye World'

        self.assertNotEqual(self.evento.test_attr, 'Goodbye World')
        self.assertEqual(self.evento.test_attr, 'Hello World')

    def test_unicode(self):  
        self.assertEquals(unicode(self.evento), u'')
        self.evento._segmentos.append('test_1')
        self.assertEquals(unicode(self.evento), u'test_1') 
        self.evento._segmentos.append('test_2') 
        self.assertEquals(unicode(self.evento), u'test_1\ntest_2') 


{'fraction_non_alphanumeric': 0.11781888997078871, 'fraction_numerical': 0.012171372930866602, 'mean_word_length': 3.576837416481069, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3584744', 'n_tokens_mistral': 705, 'n_tokens_neox': 675, 'n_words': 110}