Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FormattedExcinfo.get_source: avoid crash when line number is out-of-b…
…ounds/negative pytest could crash given pathological AST position attributes, which shouldn't happen when testing real Python code, but could happen when testing AST produced by e.g. Hylang. Another example of the failure is in the nightly CI for the JAX project: https://github.com/google/jax/actions/runs/4607513902/jobs/8142126075 Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com> Co-authored-by: Jake VanderPlas <jakevdp@google.com>
- Loading branch information