Remove random_module_path in case it exists
Stopping/terminating a cell in the middle can cause the file not to be deleted. In this case, we should delete it instead of throwing an error
https://github.com/chmp/ipytest/blame/09b7ff6a1990b88de52da565b86fac7ff63e2f37/ipytest/_impl.py#L425-L426
Good point. Never ran into this issue before. Out of interest: is there anything specific you're code is doing?
But looking at the code it seems to be an issue (nice touch using blame btw ;)). Probably it's better though to log a warning and instead use the file as-is. If the file was created deliberately, deleting it could cause all kinds of havoc.
im running a long-running tests (LLM evaluations) with https://github.com/AlmogBaku/pytest-evals
it's an open source I wrote that works with your library :)
with the recent version(released yesterday) of my project I wrote a new ipython magic that wraps ipytest with a fix for this bug... it seems to work see https://github.com/AlmogBaku/pytest-evals/blob/master/src/pytest_evals/ipython_extension.py#L42