pytest/testing/example_scripts
Pierre Sassoulas c11cdfabd1
Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff (#11911)
ruff is faster and handle everything we had prior.

isort configuration done based on the indication from
https://github.com/astral-sh/ruff/issues/4670, previousely based on
reorder-python-import (#11896)

flake8-docstrings was a wrapper around pydocstyle (now archived) that
explicitly asks to use ruff in https://github.com/PyCQA/pydocstyle/pull/658.

flake8-typing-import is useful mainly for project that support python 3.7
and the one useful check will be implemented in https://github.com/astral-sh/ruff/issues/2302

We need to keep blacken-doc because ruff does not handle detection
of python code inside .md and .rst. The direct link to the repo is
now used to avoid a redirection.

Manual fixes:
- Lines that became too long
- % formatting that was not done automatically
- type: ignore that were moved around
- noqa of hard to fix issues (UP031 generally)
- fmt: off and fmt: on that is not really identical
  between black and ruff
- autofix re-order in pre-commit from faster to slower

Co-authored-by: Ran Benita <ran@unusedvar.com>
2024-02-02 20:21:46 +01:00
..
acceptance Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff (#11911) 2024-02-02 20:21:46 +01:00
collect python: change `pytest pkg/__init__.py` to only collect the `__init__.py` Module 2023-06-23 20:42:50 +03:00
config/collect_pytest_prefix Add rudimentary mypy type checking 2019-07-09 10:49:17 +03:00
conftest_usageerror Add rudimentary mypy type checking 2019-07-09 10:49:17 +03:00
customdirectory Rework Session and Package collection 2023-12-10 17:01:39 +02:00
dataclasses fix comparison of dataclasses with `InitVar` 2022-04-08 19:51:05 -04:00
doctest/main_py #7124: Fix `--doctest-modules` crashing when `__main__.py` is present (#8949) 2021-07-27 22:50:26 +01:00
fixtures Rename pathlib hook parameters (#9363) 2021-12-03 13:14:09 +01:00
issue88_initial_file_multinodes nodes,python: mark abstract node classes as ABCs 2023-12-07 16:41:07 +02:00
marks/marks_considered_keywords Add rudimentary mypy type checking 2019-07-09 10:49:17 +03:00
perf_examples/collect_stats Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff (#11911) 2024-02-02 20:21:46 +01:00
tmpdir Remove/replace some unneeded usages of py.path 2021-03-14 14:12:28 +02:00
unittest Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff (#11911) 2024-02-02 20:21:46 +01:00
warnings Fix warnings summary 2020-05-05 21:40:34 +03:00
README.rst Small typo and grammar fix 2018-06-15 15:05:00 -03:00
__init__.py #7124: Fix `--doctest-modules` crashing when `__main__.py` is present (#8949) 2021-07-27 22:50:26 +01:00
issue_519.py Move `fixtures.py::add_funcarg_pseudo_fixture_def` to `Metafunc.parametrize` (#11220) 2023-08-09 17:13:45 +00:00
junit-10.xsd Validate xunit2 files against the schema 2019-08-09 10:55:06 -03:00
pytest.ini prepare tests and disable warnings for asyncio unittest cases 2020-03-30 21:55:12 +02:00

README.rst

Example test scripts
=====================


The files in this folder are not direct tests, but rather example test suites that demonstrate certain issues/behaviours.

In the future we will move part of the content of the acceptance tests here in order to have directly testable code instead of writing out things and then running them in nested pytest sessions/subprocesses.

This will aid debugging and comprehension.