From d633bebbf9b24e9037f008df0c1408bb0bb1f8b5 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Wed, 23 Nov 2022 12:04:52 +0300 Subject: [PATCH] Add a note that `if sys.version_info` is still required in test_cases (#9254) --- test_cases/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test_cases/README.md b/test_cases/README.md index bf647e70c..4ff8949d1 100644 --- a/test_cases/README.md +++ b/test_cases/README.md @@ -107,3 +107,7 @@ if `--python-version 3.9`, `--python-version 3.10` or `--python-version 3.11` is passed on the command line to `tests/regr_test.py`, but it *won't* run the test case if `--python-version 3.7` or `--python-version 3.8` is passed on the command line. + +However, `if sys.version_info >= (3, target):` is still required for `pyright` +in the test file itself. +Example: [`check_exception_group-py311.py`](https://github.com/python/typeshed/blob/main/test_cases/stdlib/builtins/check_exception_group-py311.py)