-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
gh-105540: Convert pytest
tests of cases_generator
to regular tests
#106713
Conversation
Fixing tests failure. I don't have access to Win, so I will experiment :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, thank you, thank you!
@@ -1584,6 +1573,17 @@ def wrap_macro(self, mac: MacroInstruction): | |||
self.out.emit(f"DISPATCH();") | |||
|
|||
|
|||
def prettify_filename(filename: str) -> str: | |||
# Make filename more user-friendly and less platform-specific, | |||
# it is only used for error reporting at this point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is incorrect, and is not the reason why we go through this much effort. The prettified filename is incorporated in the output (as part of the header explaining that this was a generated file) and must be the same regardless of where it was generated, otherwise you get spurious diffs when e.g. running the tool on Windows.
Looks like something broke our tests :( |
Huh, tests pass for me locally. Let me see if I can merge. |
If the tests pass this time I will merge this upstream. I don't care enough about the one comment to hold it up, and I'd like to add some new tests. |
Oh dang. I wish the closing |
Thanks! I will continue to make them better, since they now are a part of |
Great, we need more eyeballs on this code generator. |
I went ahead and converted them :)
Now they will be executed the same way as regular tests.
I've taken the approach we use for https://github.com/python/cpython/blob/main/Lib/test/test_clinic.py
Local run: