pytest-tornado is very convenient to write coroutine test with @pytest.mark.gen_test. But I meet some problem. When I call Subprocess in @pytest.mark.gen_test. The first call is success. The second call would be fail. I look tornado source code (https://github.com/tornadoweb/tornado/blob/6682d58bf261bcaa0d0939e4fd50a496f10a32ec/tornado/testing.py#L218) and try to add tornado.process.Subprocess.uninitialize() to resolve the problem.
I don't know what is the real root cause for the problem. But the patch works for me. If the patch does not resolve the problem what I mention. Please feel free to reject the pull request.
pytest-tornado is very convenient to write coroutine test with
@pytest.mark.gen_test
. But I meet some problem. When I callSubprocess
in@pytest.mark.gen_test
. The first call is success. The second call would be fail. I look tornado source code (https://github.com/tornadoweb/tornado/blob/6682d58bf261bcaa0d0939e4fd50a496f10a32ec/tornado/testing.py#L218) and try to addtornado.process.Subprocess.uninitialize()
to resolve the problem. I don't know what is the real root cause for the problem. But the patch works for me. If the patch does not resolve the problem what I mention. Please feel free to reject the pull request.