def _unit_transform_test(self, unit, input_instance, expected_outputs):
     outputs = unit.transform(input_instance)
     self.assertTrue(isinstance(outputs, list))
     common_testing_lib.assert_set_equality(self, expected_outputs, outputs)
     self.assertEqual(unit.input_type, type(input_instance))
     if outputs:
         self.assertEqual(unit.output_type, type(outputs[0]))
 def _unit_transform_test(self, unit, input_instance,
                          expected_outputs):
   outputs = unit.transform(input_instance)
   self.assertTrue(isinstance(outputs, list))
   common_testing_lib.assert_set_equality(self, expected_outputs, outputs)
   self.assertEqual(unit.input_type, type(input_instance))
   if outputs:
     self.assertEqual(unit.output_type, type(outputs[0]))
Beispiel #3
0
 def _unit_transform_test(
         self,
         unit,
         input_instance,  # pylint:disable=g-unreachable-test-method
         expected_outputs):
     outputs = unit.transform(input_instance)
     self.assertIsInstance(outputs, list)
     common_testing_lib.assert_set_equality(self, expected_outputs, outputs)
     self.assertEqual(unit.input_type, type(input_instance))
     if outputs:
         self.assertEqual(unit.output_type, type(outputs[0]))