Skip to content

fix(assertions): error messages from negated matchers #2619

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

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

mxschmitt
Copy link
Member

Fixes #2616

drive-by: align more sync tests with async.

Copy link
Member

@Skn0tt Skn0tt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! added tiny nit, take it or leave it.

if (attached is None or attached is True)
else "to.be.detached"
),
("to.be.attached" if attached else "to.be.detached"),
Copy link
Member

@Skn0tt Skn0tt Oct 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should we reuse attached_string here?

Suggested change
("to.be.attached" if attached else "to.be.detached"),
f"to.be.{attached_string}"

@mxschmitt mxschmitt merged commit 257a6ae into microsoft:main Oct 28, 2024
38 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: to_be_visible assertion says "Locator expected to be visible" if visible=False
2 participants