]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
typing: Add more tests for TypeVar (#104571)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Wed, 17 May 2023 13:08:21 +0000 (06:08 -0700)
committerGitHub <noreply@github.com>
Wed, 17 May 2023 13:08:21 +0000 (06:08 -0700)
commit26931944dd8abd6554249239344fa62b789b9028
tree0fcef464cf2aead5ff482458c970e725e3e970be
parent97db2f3e07bf7d56750e215e4f32653bf3867ef8
typing: Add more tests for TypeVar (#104571)

During the PEP 695 implementation at one point I made
TypeVar.__name__ return garbage, and all of test_typing passed.
So I decided to add a few more tests. In the process I discovered
a minor incompatibility from the C implementation of TypeVar:
empty constraints were returned as None instead of an empty tuple.
Lib/test/test_type_params.py
Lib/test/test_typing.py
Objects/typevarobject.c