pytestutils pytestutils ¶ Classes¶ ExptestPytestError ¶ Bases: Exception Custom exception for error reporting. ExptestPytestWrapper ¶ ExptestPytestWrapper( name, parent, exp_test, target_path, index ) Bases: Item Source code in niceml/utilities/pytestutils.py 38 39 40 41 42 43 44def __init__( self, name, parent, exp_test: ExperimentTest, target_path: str, index: int ): super().__init__(name, parent) self.exp_test = exp_test self.target_path = target_path self.index = index Functions¶ repr_failure ¶ repr_failure(excinfo, style=None) Called when self.runtest() raises an exception. Source code in niceml/utilities/pytestutils.py 51 52 53 54 55 56 57 58 59 60def repr_failure( self, excinfo, style=None, ): """Called when self.runtest() raises an exception.""" if isinstance(excinfo.value, ExptestPytestError): exp_test_result: ExpTestResult _, exp_test_result = excinfo.value.args return str(exp_test_result)