-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Let unittest frameworks deal with async functions #7144
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we perhaps should remove wrappers alltogether, are there exception handling hooks in the reporting for pdb to be hooked in
04ebaf2
to
bebbb2d
Compare
Definitely, but I prefer to do that in a separate PR (which I intend to tackle next). Btw noticed that this also fixes #6924 regarding clean up functions not being called, so I updated both tests to also ensure that. |
bebbb2d
to
f543851
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lovely then, im curious about the followup as well
Instead of trying to handle unittest-async functions in pytest_pyfunc_call, let the unittest framework handle them instead. This lets us remove the hack in pytest_pyfunc_call, with the upside that we should support any unittest-async based framework. Also included 'asynctest' as test dependency for py37-twisted, and renamed 'twisted' to 'unittestextras' to better reflect that we install 'twisted' and 'asynctest' now. This also fixes the problem of cleanUp functions not being properly called for async functions. Fix pytest-dev#7110 Fix pytest-dev#6924
f543851
to
fd2f172
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-]()
Instead of trying to handle unittest-async functions in
pytest_pyfunc_call
,let the
unittest
framework handle them instead.This lets us remove the hack in
pytest_pyfunc_call
, with the upside thatwe should support any unittest-async based framework.
Also included
asynctest
as test dependency forpy37-twisted
, and renamedtwisted
tounittestextras
to better reflect that we installtwisted
andasynctest
now instead of onlytwisted
.This also fixes the problem of cleanUp functions not being properly called for async functions.
Fix #7110
Fix #6924