def METHOD_NAME(self, argKlass, testPairs, badValues, *args, **kwargs):
    arg = argKlass("name", *args, **kwargs)
    for val, result in testPairs:
        self.assertEqual(arg.coerce(val), result)
    for val in badValues:
        self.assertRaises(formmethod.InputError, arg.coerce, val)