예제 #1
0
 def _generate_test_method(self, method_name, function):
     """Allow tests to define new test methods in their __init__'s and have appropriate suites applied."""
     suite(*getattr(self, '_suites', set()))(function)
     setattr(
         self,
         method_name,
         # http://stackoverflow.com/q/4364565
         function.__get__(self, type(self)),
     )
예제 #2
0
 def _generate_test_method(self, method_name, function):
     """Allow tests to define new test methods in their __init__'s and have appropriate suites applied."""
     suite(*getattr(self, '_suites', set()))(function)
     setattr(self, method_name, instancemethod(function, self, self.__class__))
예제 #3
0
 def _generate_test_method(self, method_name, function):
     """Allow tests to define new test methods in their __init__'s and have appropriate suites applied."""
     suite(*getattr(self, '_suites', set()))(function)
     setattr(self, method_name, instancemethod(function, self, self.__class__))