Agent.expect# Agent.expect(kinds)[source]# Get most recent pending Event and assert its kind. Parameters: kinds (str | sequence) – accepted event kind or kinds. Returns: the pending event whose kind was accepted. Return type: Event