diff --git a/kyu_5/simple_pig_latin/test_pig_it.py b/kyu_5/simple_pig_latin/test_pig_it.py index e141e8b7880..83f9e81e587 100644 --- a/kyu_5/simple_pig_latin/test_pig_it.py +++ b/kyu_5/simple_pig_latin/test_pig_it.py @@ -9,6 +9,7 @@ import unittest import allure +from parameterized import parameterized from utils.log_func import print_log from kyu_5.simple_pig_latin.pig_it import pig_it @@ -28,7 +29,12 @@ class PigItTestCase(unittest.TestCase): """Testing pig_it function.""" - def test_pig_it(self): + @parameterized.expand([ + ('Pig latin is cool', 'igPay atinlay siay oolcay'), + ('This is my string', 'hisTay siay ymay tringsay'), + ('Hello world !', 'elloHay orldway !'), + ("O tempora o mores !", 'Oay emporatay oay oresmay !')]) + def test_pig_it(self, text, expected): """ Testing pig_it function. @@ -47,13 +53,7 @@ def test_pig_it(self): '

Test Description:

' "

") # pylint: enable-msg=R0801 - with allure.step("Enter test string and verify the output"): - test_data: tuple = ( - ('Pig latin is cool', 'igPay atinlay siay oolcay'), - ('This is my string', 'hisTay siay ymay tringsay'), - ('Hello world !', 'elloHay orldway !'), - ("O tempora o mores !", 'Oay emporatay oay oresmay !')) - - for text, expected in test_data: - print_log(expected=expected, text=text) - self.assertEqual(expected, pig_it(text)) + with allure.step(f"Enter test string: {text} " + f"and verify the output: {expected}"): + print_log(expected=expected, text=text) + self.assertEqual(expected, pig_it(text))