Skip to content

Commit b2e59b5

Browse files
committed
Make 'DO NOT ADD STUPID TESTS' notice more prominent
1 parent 9d3650f commit b2e59b5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test_cases/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ This directory contains regression tests for the stubs found elsewhere in the
44
typeshed repo. Each file contains a number of test cases, all of which should
55
pass a type checker without error.
66

7+
**This directory should *only* contain tests for functions and classes which
8+
are known to have caused problems in the past, where the stubs are difficult to
9+
get right.** 100% test coverage for typeshed is neither necessary nor
10+
desirable, as it would lead to code duplication. Moreover, typeshed has
11+
multiple other mechanisms for spotting errors in the stubs.
12+
713
The internal structure of this directory should mimic typeshed as a whole.
814
However, unlike the rest of typeshed, this directory largely contains `.py`
915
files. This is because the purpose of this folder is to test the implications
1016
of typeshed changes for end users. For example, the stub for `builtins.pow` is
1117
found in `stdlib/builtins.pyi`, and the regression tests for `pow` are found in
1218
`test_cases/stdlib/test_builtins.py`.
1319

14-
100% test coverage for typeshed is neither necessary nor desirable, as it would
15-
lead to unnecessary code duplication. Moreover, typeshed has multiple other
16-
mechanisms for spotting errors in the stubs. As such, this directory should
17-
only contain tests for functions and classes which are known to have caused
18-
problems in the past, where the stubs are difficult to get right.
19-
2020
Note that, unlike elsewhere in typeshed, the test cases in this directory
2121
cannot always use modern syntax for type hints. For example, PEP 604 syntax
2222
(unions with a pipe `|` operator) is new in Python 3.10. While this syntax can

0 commit comments

Comments
 (0)