test_ok1/testing/code
Kodi Arfer 3683722bcb
FormattedExcinfo.get_source: avoid crash when line number is out-of-bounds/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>
2023-04-05 22:48:24 -03:00
..
test_code.py code: simplify Code construction 2020-10-31 12:40:25 +02:00
test_excinfo.py FormattedExcinfo.get_source: avoid crash when line number is out-of-bounds/negative 2023-04-05 22:48:24 -03:00
test_source.py Add autoflake to pre-commit configuration (#9666) 2022-02-11 14:34:02 -03:00