Migrate pytest-json to pytest-json-report

Proprietary

Replace the unmaintained pytest-json plugin with pytest-json-report. Each declaration of pytest-json becomes pytest-json-report, keeping its environment marker and the group or extra it is declared in, in pyproject.toml, Pipfile, requirements*.txt, setup.cfg, setup.py and their lock files. The plugin is used from the command line, not imported, so each pytest ... --json=FILE and each addopts carrying --json=FILE becomes --json-report --json-report-file=FILE, in pytest.ini, tox.ini, setup.cfg, pyproject.toml, Makefiles, shell scripts, Dockerfiles, noxfile.py and CI configuration, each keeping its syntax tree. The report's layout differs: pytest-json-report writes a summary, tests and collectors structure, where pytest-json wrote results and per-outcome counts, so whatever reads the file needs to follow. Report files that other tools read should be checked by hand.

org.openrewrite.python.migrate.MigratePytestJsonToPytestJsonReport
mod run . --recipe=org.openrewrite.python.migrate.MigratePytestJsonToPytestJsonReport

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.