From deeba0e5f2e65e9f75a0d5af54348b82a675aaf7 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Thu, 18 Jan 2018 14:59:24 +0100 Subject: [PATCH] Disable roman numerals conversion, add extra test --- flatisfy/tests.py | 5 +++++ flatisfy/tools.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/flatisfy/tests.py b/flatisfy/tests.py index 76e8e27..131ce21 100644 --- a/flatisfy/tests.py +++ b/flatisfy/tests.py @@ -56,6 +56,11 @@ class TestTexts(unittest.TestCase): 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): """ Checks conversion of roman numbers to arabic ones in string diff --git a/flatisfy/tools.py b/flatisfy/tools.py index 266bd78..ec62f09 100644 --- a/flatisfy/tools.py +++ b/flatisfy/tools.py @@ -238,8 +238,8 @@ def normalize_string(string): string = re.sub(r"[^a-zA-Z0-9,;:]", " ", string) # Convert roman numbers to arabic numbers - converter = RomanNumbers() - string = converter.convert_to_arabic_in_text(string) + # TODO: Fix this :) + # string = RomanNumbers.convert_to_arabic_in_text(string) # Convert to lowercase string = string.lower()