Skip to content

Run pytest with debug logging

Run pytest with debug logging duplicates the selected pytest run configuration, adds DEBUG CLI logging, and runs the selected pytest node.

How to use it

Select a pytest node in the test tree, then run BetterPy: Run Pytest with DEBUG logging from the test tree context menu.

When it helps

Use this action when a failing test needs extra pytest log output but you do not want to permanently change the original run configuration.

Notes

  • The duplicated configuration is temporary.
  • The duplicated configuration is narrowed to the selected test tree node (the pytest node id is targeted directly), so only that node runs.
  • BetterPy appends --log-cli-level=DEBUG when it is not already present.
  • The feature is gated by the Run pytest with debug logging setting under Settings | BetterPy | Testing (Pytest) | Test Tree & Navigation.