Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labgrid: pytestplugin: hooks: fix multiple start stop for StepLogger #1474

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jremmet
Copy link
Contributor

@jremmet jremmet commented Aug 13, 2024

pytests pytester can be used to run pytests inside pytest. This results in nested calls of pytest_configure and so multiple starts and stops of the StepLogger.

Only start StepLogger if it is not already active. This solution will run the cleanup hook in the "outer" pytest instance.

fixes #1468

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • Add a section on how to use the feature to doc/usage.rst
  • Add a section on how to use the feature to doc/development.rst
  • PR has been tested
  • Man pages have been regenerated

pytests pytester can be used to run pytests inside pytest.
This results in nested calls of pytest_configure and so
multiple starts and stops of the StepLogger.

Only start StepLogger if it is not already active.
This solution will run the cleanup hook in the "outer" pytest instance.

Signed-off-by: Jan Remmet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v24.0 StepLogger may be started twice which results in errors.
3 participants