Skip to content

Running test_typing file directly fails #122835

Closed

Description

@Eclips4

Bug report

Bug description:

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)

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    testsTests in the Lib/test dir
    on Aug 8, 2024
  2. added a commit that references this issue on Aug 8, 2024
  3. added a commit that references this issue on Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtopic-typingtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions