예제 #1
0
파일: magic.py 프로젝트: tomgrove/py3traits
 def __init__(self, function):
     super().__init__(function)
     self.__function = function
     self._errors = ErrorMessage(
         "While calling '{}':",
         "got arg '{name}' as '{value}' of type '{typename}' "
         "which is not any of these values: {values}",
         get_func_name(function))
예제 #2
0
 def __init__(self, function):
     super().__init__(function)
     self.__function = function
     self._errors = ErrorMessage(
         "While calling '{}':",
         "got arg '{name}' as '{value}' of type '{typename}' "
         "which is not any of these values: {values}",
         get_func_name(function))
예제 #3
0
 def test_supports_renaming_trait(self, func, given_name, expected_name):
     compiled = self.recompile(func, self.test_class, given_name)
     self.assertEqual(get_func_name(compiled), expected_name)