Skip to content

test_typing fails when run repeatedly #92064

@sweeneyde

Description

@sweeneyde

This is on the main branch, on both Windows and Linux:

sween@DESKTOP-3GGN2FL:~/cpython$ ./python -m test test_typing -R3:3
0:00:00 load avg: 8.06 Run tests sequentially
0:00:00 load avg: 8.06 [1/1] test_typing
beginning 6 repetitions
123456
.test test_typing failed -- Traceback (most recent call last):
  File "/home/sween/cpython/Lib/test/test_typing.py", line 4675, in test_get_type_hints_ClassVar
    self.assertEqual(gth(G), {'lst': ClassVar[List[T]]})
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: {'lst': typing.ClassVar[typing.List[~T]]} != {'lst': typing.ClassVar[typing.List[~T]]}
  {'lst': typing.ClassVar[typing.List[~T]]}

test_typing failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_typing

Total duration: 1.5 sec
Tests result: FAILURE

I could replicate also with this:

from test.test_typing import *
main(exit=False)
main(exit=False)

I'm not that familiar with typing in general.

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