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

Typing test error in maintenance/1.21.x #20301

Closed
charris opened this issue Nov 4, 2021 · 5 comments · Fixed by #20302
Closed

Typing test error in maintenance/1.21.x #20301

charris opened this issue Nov 4, 2021 · 5 comments · Fixed by #20302

Comments

@charris
Copy link
Member

charris commented Nov 4, 2021

@BvB93 I'm seeing the following test failure after this:

_____________________________________________________ test_reveal[arrayterator.py] _____________________________________________________

path = '/home/charris/Workspace/numpy.git/build/testenv/lib64/python3.9/site-packages/numpy/typing/tests/data/reveal/arrayterator.py'
reveal = "'typing.Generator[numpy.signedinteger[numpy.typing._64Bit], None, None]"
expected_reveal = '13: note: Revealed type is "typing.Generator[numpy.signedinteger[numpy.typing._64Bit], None, None]"', lineno = 13

    def _test_reveal(path: str, reveal: str, expected_reveal: str, lineno: int) -> None:
        if reveal not in expected_reveal:
>           raise AssertionError(_REVEAL_MSG.format(lineno, expected_reveal, reveal))
E           AssertionError: Reveal mismatch at line 13
E           
E           Expected reveal: '13: note: Revealed type is "typing.Generator[numpy.signedinteger[numpy.typing._64Bit], None, None]"'
E           Observed reveal: "'typing.Generator[numpy.signedinteger[numpy.typing._64Bit], None, None]"

expected_reveal = '13: note: Revealed type is "typing.Generator[numpy.signedinteger[numpy.typing._64Bit], None, None]"'
lineno     = 13
path       = '/home/charris/Workspace/numpy.git/build/testenv/lib64/python3.9/site-packages/numpy/typing/tests/data/reveal/arrayterator.py'
reveal     = "'typing.Generator[numpy.signedinteger[numpy.typing._64Bit], None, None]"

This is with python 3.9.7. This also shows up in 1.21.3 (previous release) and seems new, probably something in my environment has changed.

@charris
Copy link
Member Author

charris commented Nov 4, 2021

Note that the main branch is OK.

@BvB93
Copy link
Member

BvB93 commented Nov 4, 2021

I wonder why this was never caught before? A different mypy version perhaps?
In any case, #20302 will get rid of the offending stray quotation mark.

@BvB93 BvB93 linked a pull request Nov 4, 2021 that will close this issue
@BvB93
Copy link
Member

BvB93 commented Nov 4, 2021

Closed by #20302.

@BvB93 BvB93 closed this as completed Nov 4, 2021
@BvB93
Copy link
Member

BvB93 commented Nov 9, 2021

@charris I was wondering, since the numpy.typing test suite is rather tightly linked to specific mypy versions,
would it be worthwhile to backport mypy test_requirements.txt updates in the future?

@charris
Copy link
Member Author

charris commented Nov 9, 2021

@BvB93 Sounds like a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants