File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -61,3 +61,13 @@ def add_api_name_to_metadata(request, json_metadata):
6161 if hasattr (request .node , 'callspec' ):
6262 params = request .node .callspec .params
6363 json_metadata ['params' ] = to_json_serializable (params )
64+
65+ def finalizer ():
66+ # TODO: This metadata is all in the form of error strings. It might be
67+ # nice to extract the hypothesis failing inputs directly somehow.
68+ if hasattr (request .node , 'hypothesis_report_information' ):
69+ json_metadata ['hypothesis_report_information' ] = request .node .hypothesis_report_information
70+ if hasattr (request .node , 'hypothesis_statistics' ):
71+ json_metadata ['hypothesis_statistics' ] = request .node .hypothesis_statistics
72+
73+ request .addfinalizer (finalizer )
You can’t perform that action at this time.
0 commit comments