diff --git a/pyproject.toml b/pyproject.toml index 61532c5..8185970 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "complexoperations_iperoyg" -version = "0.1.3" +version = "0.1.4" authors = [ { name="Arthur Iperoyg", email="iperoyg@gmail.com" }, ] diff --git a/src/complexoperations/JustSomeString.py b/src/complexoperations/JustSomeString.py index 9f8e2e4..c2360f9 100644 --- a/src/complexoperations/JustSomeString.py +++ b/src/complexoperations/JustSomeString.py @@ -22,6 +22,8 @@ def operate(self, text: str, n: int = 1) -> int: return "Essa é a resposta para todas as perguntas" if n == 13: return "É galo" + if n == 666: + return "O.O" replicated = text * n cleaned = ''.join([e for i, e in enumerate(replicated) if i % n != 0]) return cleaned diff --git a/test/complexoperations/test_JustSomeString.py b/test/complexoperations/test_JustSomeString.py index 4adebcf..4381b11 100644 --- a/test/complexoperations/test_JustSomeString.py +++ b/test/complexoperations/test_JustSomeString.py @@ -58,3 +58,17 @@ def test4(self): assert result == 'Essa é a resposta para todas as perguntas' pass + + def test5(self): + # Arrange + complexop = JustSomeString() + number = 666 + text = 'abcd' + + # Act + result = complexop.operate(text, number) + + # Assert + assert result == 'O.O' + + pass