Skip to content

enable negative assertions on output #588

@shadeofblue

Description

@shadeofblue

the problem:

we'd like to ensure something does not appear in the output of the executed command

if we use:

            with pytest.raises(AssertionError):
                await cmd_monitor.wait_for_pattern(".*Task finished by provider", timeout=30)

this completes successfully but any subsequent assertions on output will immediately exit with an asyncio.CancelledError because of the changed state (of the internal PatternMatchingEventMonitor object ?)...

it should be possible to assert negatively on output within a given timeout without affecting results of other assertions...

Metadata

Metadata

Assignees

No one assigned

    Labels

    assertionsIssues related to temporal assertionsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions