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
I have a fixture context created when a session is created, in this context a connection to a specific program instance is made. The connection under certain conditions can fail and throw a ConnectionError exception, in this case I catch it in pytest_exception_interact and call pytest.exit. Then pytest-xdist begin handling exception and outputs the full stack trace, how can I make it output only the connection error message, without the full stack trace and other things?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a fixture context created when a session is created, in this context a connection to a specific program instance is made. The connection under certain conditions can fail and throw a ConnectionError exception, in this case I catch it in pytest_exception_interact and call pytest.exit. Then pytest-xdist begin handling exception and outputs the full stack trace, how can I make it output only the connection error message, without the full stack trace and other things?
pytest-8.3.4
pluggy-1.5.0
plugins: xdist-3.6.1
Python 3.13.0 (Windows)
Beta Was this translation helpful? Give feedback.
All reactions