def METHOD_NAME(self, func, val, expected_real, expected_imag, is_mag_phase):
    """helper method"""
    actual_real, actual_imag = func([val], is_mag_phase)
    self.assertEqual(actual_real, expected_real,
                     msg='\nreal:%s+%sj\nactual  =%r len(actual)=%i\nexpected=%r len(expected)=%i' % (
        val.real, val.imag, actual_real, len(actual_real), expected_real, len(expected_real)))
    self.assertEqual(actual_imag, expected_imag,
                     msg='\nimag %s+%sj:\nactual  =%r len(actual)=%i\nexpected=%r len(expected)=%i' % (
        val.real, val.imag, actual_imag, len(actual_imag), actual_imag, len(expected_imag)))