-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
When run outside the test runner you get this:
$ mypy tests/fail/fail_example.py
tests/fail/fail_example.py:6: error: No overload variant of "int" matches argument type "Dict[Any, Any]"
tests/fail/fail_example.py:6: note: Possible overload variant:
tests/fail/fail_example.py:6: note: def int(self, x: Union[str, bytes, SupportsInt] = ...) -> int
tests/fail/fail_example.py:6: note: <1 more non-matching overload not shown>
When run in the test runner the lines starting with "note" cause problems with the tests.
if "# E:" in target_line:
marker = target_line.split("# E:")[-1].strip()
assert lineno in errors, f'Extra error "{marker}"'
assert marker in errors[lineno]
else:
> pytest.fail(f'Error {repr(errors[lineno])} not found')
E Failed: Error 'tests/fail/fail_example.py:6: note: def int(self, x: Union[str, unicode, bytearray], base: int = ...) -> int' not found
Reactions are currently unavailable