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

Add test documenting #17230 #17199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add test documenting #17230 #17199

wants to merge 1 commit into from

Conversation

tamird
Copy link
Contributor

@tamird tamird commented Apr 30, 2024

Add a test demonstrating #17230.

@tamird
Copy link
Contributor Author

tamird commented Apr 30, 2024

@hauntsaninja

@tamird
Copy link
Contributor Author

tamird commented May 9, 2024

@hauntsaninja would you mind taking a look?

@JelleZijlstra
Copy link
Member

I'm not Shantanu but I don't think we should add a test that's testing incorrect behavior. Maybe make it an xfail test with the desired behavior.

@tamird
Copy link
Contributor Author

tamird commented May 9, 2024

How do I make it xfail? mypy seems to have a bespoke testing framework.

@JelleZijlstra
Copy link
Member

Grep for xfail in the mypy sourcecode and you'll see.

@tamird tamird changed the title Add test documenting #12998 Add test documenting #17230 May 9, 2024
async def main() -> None:
match await func1(True):
case str(a):
match await func2(True):
Copy link
Member

Choose a reason for hiding this comment

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

Does this nesting add anything to the test? Better to keep tests simple unless the additional complexity tests something interesting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was following the lead of the preceding test case. See above ^

@tamird
Copy link
Contributor Author

tamird commented May 9, 2024

Done, thanks.

@JelleZijlstra JelleZijlstra self-requested a review May 9, 2024 16:19
@tamird
Copy link
Contributor Author

tamird commented May 9, 2024

@JelleZijlstra anything further?

@tamird
Copy link
Contributor Author

tamird commented May 13, 2024

Ping. Can we merge this please?

@JelleZijlstra
Copy link
Member

It's on my list of pending reviews, so I will get to it.

However, the repeated pings feel very strange to me. Why is it important to you that we merge a change that just adds a failing test?

@tamird
Copy link
Contributor Author

tamird commented May 13, 2024

It's more important that #17230 is acknowledged certainly. Apologies for the nuisance.

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.

None yet

2 participants