File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,4 +205,11 @@ def pytest_sessionfinish(session: Session) -> None:
205205def pytest_assertrepr_compare (
206206 config : Config , op : str , left : Any , right : Any
207207) -> list [str ] | None :
208- return util .assertrepr_compare (config = config , op = op , left = left , right = right )
208+ highlighter = config .get_terminal_writer ()._highlight
209+ return util .assertrepr_compare (
210+ op = op ,
211+ left = left ,
212+ right = right ,
213+ verbose = config .get_verbosity (Config .VERBOSITY_ASSERTIONS ),
214+ highlighter = highlighter ,
215+ )
Original file line number Diff line number Diff line change @@ -174,11 +174,14 @@ def has_default_eq(obj: object) -> bool:
174174
175175
176176def assertrepr_compare (
177- config : Config , op : str , left : object , right : object
177+ op : str ,
178+ left : object ,
179+ right : object ,
180+ * ,
181+ verbose : int ,
182+ highlighter : _HighlightFunc ,
178183) -> list [str ] | None :
179184 """Return specialised explanations for some operators/operands."""
180- verbose = config .get_verbosity (Config .VERBOSITY_ASSERTIONS )
181-
182185 # Strings which normalize equal are often hard to distinguish when printed; use ascii() to make this easier.
183186 # See issue #3246.
184187 use_ascii = (
@@ -201,7 +204,6 @@ def assertrepr_compare(
201204 right_repr = saferepr (right , maxsize = maxsize , use_ascii = use_ascii )
202205
203206 summary = f"{ left_repr } { op } { right_repr } "
204- highlighter = config .get_terminal_writer ()._highlight
205207
206208 explanation = None
207209 try :
You can’t perform that action at this time.
0 commit comments