Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable negative assertions on output #588

Open
shadeofblue opened this issue Jun 8, 2022 · 0 comments
Open

enable negative assertions on output #588

shadeofblue opened this issue Jun 8, 2022 · 0 comments
Labels
assertions Issues related to temporal assertions bug Something isn't working

Comments

@shadeofblue
Copy link
Collaborator

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...

@shadeofblue shadeofblue added bug Something isn't working assertions Issues related to temporal assertions labels Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assertions Issues related to temporal assertions bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant