Skip to content

Add test documenting #17230 - #17199

Merged
JelleZijlstra merged 1 commit into
python:masterfrom
tamird:test-case
May 21, 2024
Merged

JelleZijlstra merged 1 commit into
python:masterfrom
tamird:test-case

Conversation

@tamird

@tamird tamird commented Apr 30, 2024 •

Copy link
Copy Markdown
Contributor

Add a test demonstrating #17230.

@tamird

tamird commented Apr 30, 2024

Copy link
Copy Markdown
Contributor Author

@hauntsaninja

@tamird

tamird commented May 9, 2024

Copy link
Copy Markdown
Contributor Author

@hauntsaninja would you mind taking a look?

@JelleZijlstra

Copy link
Copy Markdown
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

tamird commented May 9, 2024 •

Copy link
Copy Markdown
Contributor Author

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

@JelleZijlstra

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

tamird commented May 9, 2024

Copy link
Copy Markdown
Contributor Author

Done, thanks.

@JelleZijlstra
JelleZijlstra self-requested a review May 9, 2024 16:19
@tamird

tamird commented May 9, 2024

Copy link
Copy Markdown
Contributor Author

@JelleZijlstra anything further?

@tamird

tamird commented May 13, 2024

Copy link
Copy Markdown
Contributor Author

Ping. Can we merge this please?

@JelleZijlstra

Copy link
Copy Markdown
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

tamird commented May 13, 2024

Copy link
Copy Markdown
Contributor Author

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

@JelleZijlstra
JelleZijlstra merged commit 3579c61 into python:master May 21, 2024
@tamird
tamird deleted the test-case branch May 21, 2024 08:56
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.

2 participants