You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use pytester to test our hooks together with labgrid.
Since v24.0 we run into errors because StepLogger.start is called again by pytester via pytest_configure hook.
Thats unfortunate. I guess allowing multiple starts for the StepLogger should not be too bad, so I think we should handle that in the the Steplogger class, if @jluebbe and @Bastian-Krause agree.
Thats unfortunate. I guess allowing multiple starts for the StepLogger should not be too bad, so I think we should handle that in the the Steplogger class, if @jluebbe and @Bastian-Krause agree.
I added a PR which handle it in the pytest hook. If we just ignore multiple calls, we will run stop to early.
Alternatively we need to count the starts and stops, which seams fragile if called directly.
Thats unfortunate. I guess allowing multiple starts for the StepLogger should not be too bad, so I think we should handle that in the the Steplogger class, if @jluebbe and @Bastian-Krause agree.
I don't know the implications of that. As long as you say it's safe, I have no objections.
We use pytester to test our hooks together with labgrid.
Since v24.0 we run into errors because
StepLogger.start
is called again by pytester viapytest_configure
hook.minimal example:
test_mini.py
Is it possible to replace the asserion by a if clause here:
labgrid/labgrid/logging.py
Line 147 in 7f2c8fc
Or add a "is-already-running" check here:
labgrid/labgrid/pytestplugin/hooks.py
Line 65 in 7f2c8fc
?
The text was updated successfully, but these errors were encountered: