test_ok2/testing
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
..
_py Fix typing errors after mypy update 2022-11-15 08:53:23 -03:00
code FormattedExcinfo.get_source: avoid crash when line number is out-of-bounds/negative 2023-04-05 22:48:24 -03:00
example_scripts fix comparison of dataclasses with `InitVar` 2022-04-08 19:51:05 -04:00
examples fix bug in test for issue 519 2021-03-07 15:01:39 +01:00
freeze testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
io Fix tests pygments 2.14.0 2023-01-04 10:30:28 +01:00
logging Add --log-disable CLI option (#10371) 2022-10-23 18:23:34 -03:00
plugins_integration build(deps): Bump pytest-asyncio in /testing/plugins_integration (#10827) 2023-03-24 11:40:06 -03:00
python Add check for zero denominator in approx (#10624) 2023-01-24 07:07:42 -03:00
acceptance_test.py Fix test_cmdline_python_namespace_package (#10788) 2023-03-03 12:25:33 -03:00
conftest.py Drop attrs dependency, use dataclasses instead (#10669) 2023-01-20 11:13:36 +02:00
deprecated_test.py Add deprecations for tests written for `nose` (#9907) 2022-10-09 17:16:33 -03:00
test_argcomplete.py pytest-dev#8204 migrate some tests to tmp_path fixture (#8209) 2021-01-01 17:25:11 +02:00
test_assertion.py Avoid truncation when truncating means longer output (#10446) 2022-12-17 10:24:46 -03:00
test_assertrewrite.py Fix walrus operator support in assertion rewriting (#10758) 2023-03-10 07:32:36 -03:00
test_cacheprovider.py [pre-commit.ci] pre-commit autoupdate (#10712) 2023-02-07 19:30:33 -03:00
test_capture.py capture: improve NoCapture typing 2023-01-23 14:12:01 +02:00
test_collection.py Class methods can now be discovered as tests (#10552) 2022-12-02 15:53:04 +00:00
test_compat.py Enable testing with Python 3.11 (#9511) 2022-02-11 15:20:42 +00:00
test_config.py split up report header lines 2023-03-17 21:58:26 +01:00
test_conftest.py testing: fix Path.rglob("") failures in Python 3.11b1 2022-05-09 12:52:57 +03:00
test_debugging.py Test fix 2022-10-14 13:53:06 -04:00
test_doctest.py [pre-commit.ci] pre-commit autoupdate (#10712) 2023-02-07 19:30:33 -03:00
test_entry_points.py Replace importlib_metadata with importlib.metadata on Python 3.8+ 2019-07-04 15:00:10 +02:00
test_error_diffs.py Fix diff output for data types where `-v` would show less information (#9661) 2022-02-15 09:43:20 -03:00
test_faulthandler.py Only re-enable fauthandler during unconfigure if it was enabled before 2021-01-25 12:28:00 -03:00
test_findpaths.py Fix bug where file system root was erroneously be used as rootdir on Windows 2022-11-23 14:46:00 -03:00
test_helpconfig.py Document the --code-highlight default (#9883) 2022-05-31 16:32:51 -03:00
test_junitxml.py [pre-commit.ci] pre-commit autoupdate (#10712) 2023-02-07 19:30:33 -03:00
test_legacypath.py Ensure Config.inifile is available during pytest_cmdline_main 2022-01-04 10:03:28 -03:00
test_link_resolve.py tests: Migrate to pytester - final update 2020-12-18 11:02:38 -08:00
test_main.py Adjust tests for a last minute Python 3.11 change in the traceback format 2022-07-13 17:14:37 +02:00
test_mark.py Apply suggestions from code review 2022-10-12 10:20:16 +02:00
test_mark_expression.py Support forwardslash characters in identifiers (#9249) 2021-11-01 08:54:18 +02:00
test_meta.py py36+: com2ann 2020-10-05 18:33:17 -07:00
test_monkeypatch.py Fix test_cmdline_python_namespace_package (#10788) 2023-03-03 12:25:33 -03:00
test_nodes.py Delay warning about collector/item diamond inheritance 2022-02-10 13:50:25 -03:00
test_nose.py Fix fixtures named teardown being considered by nose (#10696) 2023-01-27 14:33:46 -03:00
test_parseopt.py Update syntax to Python3.7+. 2021-12-28 10:11:35 +01:00
test_pastebin.py fix typing issues in mypy 0.920 2021-12-21 20:42:32 -05:00
test_pathlib.py Drop attrs dependency, use dataclasses instead (#10669) 2023-01-20 11:13:36 +02:00
test_pluginmanager.py Adjust doc links for new scheme 2021-07-06 09:11:35 +02:00
test_pytester.py pytester now requests monkeypatch instead of creating its own instance 2022-03-04 08:58:44 -05:00
test_python_path.py Rename ``pythonpath`` plugin to ``python_path`` 2022-02-09 10:03:20 +02:00
test_recwarn.py Enhance errors for exception/warnings matching (#8508) 2022-03-20 23:32:39 -03:00
test_reports.py Propagate timestamps from CallInfo to TestReport objects (#10711) 2023-02-10 17:52:54 -03:00
test_runner.py Document the location tuple (#10700) 2023-02-12 11:20:53 -03:00
test_runner_xunit.py [pre-commit.ci] pre-commit autoupdate (#8201) 2020-12-30 11:56:09 +02:00
test_scope.py Refactor internal scope handling by introducing Scope enum 2021-08-01 06:11:56 -03:00
test_session.py testing/test_session: add a regression test for an old bug 2021-11-15 23:22:54 +02:00
test_setuponly.py Migrate test_setuponly.py from testdir to pytester (#7959) 2020-10-29 09:55:30 +02:00
test_setupplan.py #7942 test_setupplan.py migrate from testdir to Pytester (#8004) 2020-11-07 09:29:45 -03:00
test_skipping.py Show test name when skipping from fixture (#10482) 2022-11-18 09:20:38 -03:00
test_stash.py Fix typos (#9424) 2021-12-27 09:23:15 -03:00
test_stepwise.py Do not update cache from xdist worker (#10641) 2023-01-13 07:14:52 -03:00
test_terminal.py split up report header lines 2023-03-17 21:58:26 +01:00
test_threadexception.py Fix warning filters used in tests 2021-05-04 17:25:02 +02:00
test_tmpdir.py Drop attrs dependency, use dataclasses instead (#10669) 2023-01-20 11:13:36 +02:00
test_tracebackhide.py Correctly handle tracebackhide for chained exceptions (#10772) 2023-03-15 08:10:25 -03:00
test_unittest.py Do not call tearDown for skipped unittest.TestCases with --pdb 2022-06-27 10:33:37 -03:00
test_unraisableexception.py Fix warning filters used in tests 2021-05-04 17:25:02 +02:00
test_warning_types.py fix #10342: put location into warning exceptions 2022-10-06 11:44:05 +02:00
test_warnings.py Expand warnings output for ResourceWarning (#9682) 2022-02-15 13:00:50 +00:00
typing_checks.py Derive pytest.raises from AbstractContextManager 2023-01-13 13:58:49 -05:00