@@ -152,8 +152,9 @@ def test_fail(path: str) -> None:
152152 target_line = lines [lineno - 1 ]
153153 if "# E:" in target_line :
154154 expression , _ , marker = target_line .partition (" # E: " )
155- expected_error = errors [lineno ]
156- _test_fail (path , expression , marker .strip (), expected_error .strip (), lineno )
155+ expected_error = errors [lineno ].strip ()
156+ marker = marker .strip ()
157+ _test_fail (path , expression , marker , expected_error , lineno )
157158 else :
158159 pytest .fail (
159160 f"Unexpected mypy output at line { lineno } \n \n { errors [lineno ]} "
@@ -184,7 +185,9 @@ def _test_fail(
184185 if expected_error is None :
185186 raise AssertionError (_FAIL_MSG1 .format (lineno , expression , error ))
186187 elif error not in expected_error :
187- raise AssertionError (_FAIL_MSG2 .format (lineno , expression , expected_error , error ))
188+ raise AssertionError (_FAIL_MSG2 .format (
189+ lineno , expression , expected_error , error
190+ ))
188191
189192
190193def _construct_ctypes_dict () -> dict [str , str ]:
0 commit comments