Task was destroyed but it is pending! using PyTest for Replay testing

I have pytest that use the Replayer with history loaded from a json file downloaded from the UI. The tests are running as expected and passing.

However I get the following output

tests/test_workflow_history.py::test_nondeterminism_workflow_history_for_v1_0 PASSED [ 50%]
----------------------------- live log teardown -----------------------------
17:11:33 [   ERROR] Task was destroyed but it is pending!
task: <Task pending name='Task-39' coro=<<async_generator_athrow without __name__>()>> (base_events.py:1771)

tests/test_workflow_history.py::test_nondeterminism_workflow_history_for_v1_1_patch_MovedThankYouAfterLoop PASSED [100%]
----------------------------- live log teardown -----------------------------
17:11:33 [   ERROR] Task was destroyed but it is pending!
task: <Task pending name='Task-78' coro=<<async_generator_athrow without __name__>()>> (base_events.py:1771)

Here is the pytest code

@pytest.mark.asyncio
async def test_nondeterminism_workflow_history_for_v1_0() -> None:
    replayer = Replayer(workflows=[LoanProcessingWorkflow])
    await replayer.replay_workflow(
        WorkflowHistory.from_json(
            workflow_id="loan-processing-workflow-a100",
            history=json.load(open("temporal/history/loan_workflow_v1_0.json")),
        )
    )


@pytest.mark.asyncio
async def test_nondeterminism_workflow_history_for_v1_1_patch_MovedThankYouAfterLoop() -> None:
    replayer = Replayer(workflows=[LoanProcessingWorkflow])
    await replayer.replay_workflow(
        WorkflowHistory.from_json(
            workflow_id="loan-processing-workflow-a100",
            history=json.load(open("temporal/history/loan_workflow_v1_1.json")),
        )
    )

Is the error anything to be concerned about? Any way to resolve it? Removing the asyncio marker does not make a difference.

Hrmm, I think it depends on the workflow code. It can show that somewhere in your workflow you’re starting a task you’re not awaiting, but it could also be a permaturely exited workflow for some other reason. To know for sure, I’d have to see a standalone replication that included the workflow (and to confirm which SDK and Python version since they have changed some of this in newer versions).