Disable roman numerals conversion, add extra test

This commit is contained in:
Lucas Verney 2018-01-18 14:59:24 +01:00
parent d482d9b6fa
commit deeba0e5f2
2 changed files with 7 additions and 2 deletions

View File

@ -56,6 +56,11 @@ class TestTexts(unittest.TestCase):
tester.convert_to_arabic_in_text("A AIX EN PROVENCE") tester.convert_to_arabic_in_text("A AIX EN PROVENCE")
) )
self.assertEqual(
"Montigny Le Bretonneux",
tester.convert_to_arabic_in_text("Montigny Le Bretonneux")
)
def test_roman_numbers_in_text(self): def test_roman_numbers_in_text(self):
""" """
Checks conversion of roman numbers to arabic ones in string Checks conversion of roman numbers to arabic ones in string

View File

@ -238,8 +238,8 @@ def normalize_string(string):
string = re.sub(r"[^a-zA-Z0-9,;:]", " ", string) string = re.sub(r"[^a-zA-Z0-9,;:]", " ", string)
# Convert roman numbers to arabic numbers # Convert roman numbers to arabic numbers
converter = RomanNumbers() # TODO: Fix this :)
string = converter.convert_to_arabic_in_text(string) # string = RomanNumbers.convert_to_arabic_in_text(string)
# Convert to lowercase # Convert to lowercase
string = string.lower() string = string.lower()