teddecor.UnitTest.sample_test_file
class
NonTestClass:
Class used to indentify and run tests. It will also print the results to the screen.
def
example(*args, **kwargs)
86 def test_wrapper(*args, **kwargs): 87 """Executes the function this decorator is on and collect the run results. 88 89 Returns: 90 tuple: The test run results. Formatted in the order of function name, type of result, and addition info. 91 92 Note: 93 In the case of a skip and failed result the info portion is filled it with the type of skip and the traceback respectivily. 94 """ 95 try: 96 func(*args, **kwargs) 97 except AssertionError as error: 98 return (func.__name__, ResultType.FAILED, __getTracback(error)) 99 except NotImplementedError: 100 return (func.__name__, ResultType.SKIPPED, "") 101 102 return (func.__name__, ResultType.SUCCESS, "")
Executes the function this decorator is on and collect the run results.
Returns: tuple: The test run results. Formatted in the order of function name, type of result, and addition info.
Note: In the case of a skip and failed result the info portion is filled it with the type of skip and the traceback respectivily.
Inherited Members
def
NonTestFunc()