File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
hypothesis-python/src/hypothesis Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 7070from hypothesis .internal .compat import (
7171 PYPY ,
7272 BaseExceptionGroup ,
73+ add_note ,
7374 bad_django_TestCase ,
7475 get_type_hints ,
7576 int_from_bytes ,
@@ -1008,15 +1009,6 @@ def run_engine(self):
10081009 _raise_to_user (errors_to_report , self .settings , report_lines )
10091010
10101011
1011- def add_note (exc , note ):
1012- try :
1013- exc .add_note (note )
1014- except AttributeError :
1015- if not hasattr (exc , "__notes__" ):
1016- exc .__notes__ = []
1017- exc .__notes__ .append (note )
1018-
1019-
10201012def _raise_to_user (errors_to_report , settings , target_lines , trailer = "" ):
10211013 """Helper function for attaching notes and grouping multiple errors."""
10221014 failing_prefix = "Falsifying example: "
Original file line number Diff line number Diff line change 4343WINDOWS = platform .system () == "Windows"
4444
4545
46+ def add_note (exc , note ):
47+ try :
48+ exc .add_note (note )
49+ except AttributeError :
50+ if not hasattr (exc , "__notes__" ):
51+ exc .__notes__ = []
52+ exc .__notes__ .append (note )
53+
54+
4655def escape_unicode_characters (s : str ) -> str :
4756 return codecs .encode (s , "unicode_escape" ).decode ("ascii" )
4857
You can’t perform that action at this time.
0 commit comments