-
Notifications
You must be signed in to change notification settings - Fork 76
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
fix: support const
in typename
#1231
Conversation
6ddb559
to
72076e2
Compare
75d950b
to
5836b12
Compare
When full test suite is ran the following error is seen: ``` ____________________________ test_const_in_typename ____________________________ def test_const_in_typename(): > assert parse_typename("TH1I*") == AsPointer(Model_TH1I) E AssertionError: assert AsPointer(Model_TH1I) == AsPointer(Model_TH1I) E + where AsPointer(Model_TH1I) = parse_typename('TH1I*') E + and AsPointer(Model_TH1I) = AsPointer(Model_TH1I) tests/test_1229_const_in_typename.py:12: AssertionError ``` Running just the `tests/test_1229_const_in_typename.py` doesn't show that. Not clear what re-defines the types/modules.
This is ready for review. I could not resolve one of the issues with a test (see b2928b3), and instead found a reasonable alternative way to do the same test. |
Thanks for getting back to this! The strategy of checking for It should not be necessary to apply the workaround described in b2928b3. I checked out this branch and >>> parse_typename("TH1I*") == AsPointer(Model_TH1I)
True
>>> parse_typename("const TH1I*") == AsPointer(Model_TH1I)
True Moreover, this is not how the tests are failing—they're failing because they can't access test files through HTTP. It seems like some server is down. I'm running the tests again in main, and we'll see if there's an error there. I should also look through the |
The tests in #1362 is an adjustment for that, and if it works, it will merge into main and then can be merged into this PR branch, which will fix the tests. |
In the two now-dead code blocks that I removed, I noticed that our old policy had always been to ignore the |
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.
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.
Thanks! Looks great. The tests should pass now.
I appreciate the fixups to the existing code. My recollection was that |
The only two `const` cases that had been handled before were strings. Your
solution takes the `const` off of any type.
…On Sat, Jan 18, 2025, 6:12 AM Dmitry Kalinkin ***@***.***> wrote:
I appreciate the fixups to the existing code. My recollection was that
const types would outright not parse without my change, so I did not
think of looking for those cases.
—
Reply to this email directly, view it on GitHub
<#1231 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOEIHZUYWUSO335XVRUQQ32LGPPBAVCNFSM6AAAAABVKNM2D6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJZGQZDENRZGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Resolves: #1229