How can I catch Exception which would raise in conftest.py #11229
Unanswered
megachweng
asked this question in
Q&A
Replies: 1 comment
-
Have you considered calling |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've developed a Pytest plugin, which is used to make a http request to report the status of the tests to an external system during execution.
However, as I have no control over my colleagues' code, they might make some errors in
conftest.py
, which could crash before this plugin is even loaded. Therefore, the external system is unable to receive the test status and stuck there.In this situation, how can I ensure that I can catch all exceptions and send
error occured
report to the external system?I also tries using
subprocess
but still can not 'try catch' which type of error is occured during the test.
Beta Was this translation helpful? Give feedback.
All reactions