test: assert line numbers of evaluated source (#6169)

* test: assert line numbers of evaluated source

#6089 dropped the coding cookie prepended to py::eval/py::exec source,
which had shifted reported SyntaxError and traceback line numbers by one,
and noted that no test asserted on them. Add one: errors on line 2 of the
evaluated source must report line 2. With pybind11's own test target the
new test reports (3, 3) against the parent of #6089 and (2, 2) with the fix.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* style: pre-commit fixes

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2 files changed