Skip to content

Commit

Permalink
re.UNICODE
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloCastellano committed Jun 27, 2015
1 parent 4f5b01e commit b958ba9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bormeparser/regex.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ def regex_cargos(data):
[('Auditor', {'ACME AUDITORES SL'}), ('Aud.Supl.', {'MACIAS MUÑOZ FELIPE JOSE'})]
"""
cargos = []
for cargo in re.findall(RE_CARGOS_MATCH, data):
for cargo in re.findall(RE_CARGOS_MATCH, data, re.UNICODE):
cargos.append((cargo[0], set(cargo[1].split(';'))))
return cargos
4 changes: 2 additions & 2 deletions bormeparser/tests/test_bormeregex.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
from bormeparser.regex import regex_cargos

DATA = {'fake1': [('Adm. Solid.', {'RAMA SANCHEZ JAVIER JORGE', 'RAMA SANCHEZ JOSE PEDRO'})],
'fake2': [('Auditor', {'ACME AUDITORES SL'}), ('Aud.Supl.', {'MACIAS MUÑOZ FELIPE JOSE'})]}
'fake2': [('Auditor', {'ACME AUDITORES SL'}), ('Aud.Supl.', {u'MACIAS MUÑOZ FELIPE JOSE'})]}

class BormeparserRegexCargosTestCase(unittest.TestCase):
nombramientos1 = 'Adm. Solid.: RAMA SANCHEZ JOSE PEDRO;RAMA SANCHEZ JAVIER JORGE.'
nombramientos2 = 'Auditor: ACME AUDITORES SL. Aud.Supl.: MACIAS MUÑOZ FELIPE JOSE.'
nombramientos2 = u'Auditor: ACME AUDITORES SL. Aud.Supl.: MACIAS MUÑOZ FELIPE JOSE.'

def test_regexp_nombramientos(self):
cargos1 = regex_cargos(self.nombramientos1)
Expand Down

0 comments on commit b958ba9

Please sign in to comment.