示例#1
0
    def test_separate_appetizers(self):
        test_data = zip(dishes_and_appetizers, dishes_cleaned)

        for variant, (item, result) in enumerate(test_data, start=1):
            with self.subTest(f"variation #{variant}", item=item, result=result):
                error_message = "Expected only appetizers returned, but some dishes remain in the group."
                self.assertEqual(sorted(separate_appetizers(item[0], item[1])), (sorted(result)), msg=error_message)
示例#2
0
    def test_separate_appetizers(self):
        input_data = dishes_and_appetizers
        result_data = dishes_cleaned
        number_of_variants = number_of_variants = range(1, len(input_data) + 1)

        for variant, item, result  in zip(number_of_variants, input_data, result_data):
            with self.subTest(f"variation #{variant}", item=item, result=result):
                self.assertEqual(sorted(separate_appetizers(item[0], item[1])), (sorted(result)))