Resume a stopped test session #8673
-
I have been looking into this for a few hours now. I haven't found much. What I need to resume a session which was stopped, probably due to loss of power. Is this possible? I have found very little via many Google searches and time on Stackoverflow. The closes I've found thus far is this http://lists.idyll.org/pipermail/testing-in-python/2018-January/007157.html. At that time, the OP was told that "support for this didn't yet exist." It's 3 years later, has this changed? If it hasn't changed, what sort of things would be important if writing our own set of plugins to support such a feature? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @AndrewFalanga, Currently there's no native support for that, but the OP in the message comments that he managed to write a simple plugin that does this as he intends. I suggest to follow the same idea, should be relatively simple, here's a quick outline:
Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hi @AndrewFalanga,
Currently there's no native support for that, but the OP in the message comments that he managed to write a simple plugin that does this as he intends.
I suggest to follow the same idea, should be relatively simple, here's a quick outline:
pytest_runtest_protocol
as a hookwrapper: when the wrapper "ends", it means the test ran to completion, so record the test node id in a specific file on disk.pytest_sessionfinish
), delete that file from disk to indicate a complete run.pytest_collection_modifyitems
, which then should see if the file exists: if it does, it should remove th…