Closed pytest-timeout-bot closed 6 years ago
Original comment by Floris Bruynooghe (Bitbucket: flub, GitHub: flub).
Hi Pedro! Seems reasonable, what API did you have in mind to specify it? Another argument to the marker? Maybe combined with a default in the configuration file as well or is that overkill?
Anyway, if it's of use to you it would be great if you could contribute a patch for it!
Thanks
Original comment by Pedro Algarvio (Bitbucket: [Pedro Algarvio](https://bitbucket.org/Pedro Algarvio), ).
Both your suggestions seem like the right path to take. What should we call the new option?
I'll try to code something up...
Original comment by Pedro Algarvio (Bitbucket: [Pedro Algarvio](https://bitbucket.org/Pedro Algarvio), ).
timeout_defer
for the INI option and defer
for the marker argument?
Original comment by Pedro Algarvio (Bitbucket: [Pedro Algarvio](https://bitbucket.org/Pedro Algarvio), ).
https://bitbucket.org/pytest-dev/pytest-timeout/pull-requests/9/allow-deferring-timeouts-to-the-test
Original report by Pedro Algarvio (Bitbucket: [Pedro Algarvio](https://bitbucket.org/Pedro Algarvio), ).
Right now, the plugin includes all of the fixture prep work towards the actual test as part of the timeout. If we have enough prep work, bringing a DB daemon up, or similar, and a fairly low timeout value, we could hit timeout even before starting the actual testing.
By using
pytest_pyfunc_call
instead ofpytest_runtest_protocol
we could not include the fixture setup/teardown towards the actual timeout.For backwards compatibility, this should probably be configurable.