]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
annotationlib: Move ForwardRef tests to test_annotationlib (#132571)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Wed, 16 Apr 2025 13:40:29 +0000 (06:40 -0700)
committerGitHub <noreply@github.com>
Wed, 16 Apr 2025 13:40:29 +0000 (13:40 +0000)
commit7dcaebfb2148a1b972f884733c7babc9b64f2146
tree78c1338ae074cd7fdb4e48f1e69f9c453085d699
parent10a77619f9a465ecfbd1ccb4f8aea9175d76912d
annotationlib: Move ForwardRef tests to test_annotationlib (#132571)

I started with just moving ForwardRefTests to test_annotationlib,
but found that it contained a number of tests for no_type_check, which
I moved to a new class in test_typing, as well as a number of tests that
are more appropriately classified as tests for get_type_hints().

One test, test_forward_equality_namespace(), was somewhat accidentally
depending on a global class A in test_typing. I added a class A in the
annotationlib tests instead.

Also add a useful comment in annotationlib.
Lib/annotationlib.py
Lib/test/test_annotationlib.py
Lib/test/test_typing.py