Skip to content

gh-122835: Fix module name in test_typing #122836

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

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

Eclips4
Copy link
Member

@Eclips4 Eclips4 commented Aug 8, 2024

@Eclips4
Copy link
Member Author

Eclips4 commented Aug 8, 2024

Previously:

eclips4@nixos ~/p/p/cpython (main)> ./python Lib/test/test_typing.py
...................................................................................................................................................................................................................................................................s.........................................................................................................................................................................................................................................................................................................................................F............................................................................................
======================================================================
FAIL: test_annotations (__main__.TypedDictTests.test_annotations)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/eclips4/programming/programming-languages/cpython/Lib/test/test_typing.py", line 8832, in test_annotations
    self.assertEqual(Y.__annotations__, {'a': type(None), 'b': fwdref})
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: {'a': <class 'NoneType'>, 'b': ForwardRef('int', module='__main__')} != {'a': <class 'NoneType'>, 'b': ForwardRef('int', module='test.test_typing')}
- {'a': <class 'NoneType'>, 'b': ForwardRef('int', module='__main__')}
?                                                           ^^^  ^^

+ {'a': <class 'NoneType'>, 'b': ForwardRef('int', module='test.test_typing')}
?                                                          +++++++++ ^^^  ^


----------------------------------------------------------------------
Ran 682 tests in 0.506s

FAILED (failures=1, skipped=1)

Now:

eclips4@nixos ~/p/p/cpython (main) [1]> ./python Lib/test/test_typing.py
...................................................................................................................................................................................................................................................................s......................................................................................................................................................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 682 tests in 0.529s

OK (skipped=1)

@AlexWaygood AlexWaygood enabled auto-merge (squash) August 8, 2024 19:02
@AlexWaygood
Copy link
Member

Does this need backporting, or is this one of the new tests added in 3.14?

@Eclips4
Copy link
Member Author

Eclips4 commented Aug 8, 2024

Does this need backporting, or is this one of the new tests added in 3.14?

This is a new test, backports aren't need.
(This was added in the 7b7b90d)

@AlexWaygood
Copy link
Member

Great, thanks!

@AlexWaygood AlexWaygood merged commit 2037d8c into python:main Aug 8, 2024
39 checks passed
@Eclips4 Eclips4 deleted the issue-122835 branch August 8, 2024 20:29
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants