@@ -31,17 +31,23 @@ with text "abc..."
3131- note a space after ` E: ` and ` flags: `
3232- ` # E:12 ` adds column number to the expected error
3333- use ` \ ` to escape the ` # ` character and indicate that the rest of the line is part of
34- the error message (note that there is no support for using ` \\ ` to escape a backslash itself)
34+ the error message (note that there is no support for using ` \\ ` to escape a backslash itself
35+ in this context; also, in all other contexts, such as line-continuation, the backslash is treated
36+ as it normally would be in a python source file)
3537- repeating ` # E: ` several times in one line indicates multiple expected errors in one line
3638- ` W: ... ` and ` N: ... ` works exactly like ` E: ... ` , but report a warning and a note respectively
3739- lines that don't contain the above should cause no type check errors
40+ - lines that begin with ` -- ` are test-file-format comments, and will not appear in the texted python
41+ source code
42+ - some test files are run in a special way by the test runner; this is typically documented in
43+ test-file-format comments at the top of the test file
3844- optional ` [builtins fixtures/...] ` tells the type checker to use
3945` builtins ` stubs from the indicated file (see Fixtures section below)
4046- optional ` [out] ` is an alternative to the ` # E: ` notation: it indicates that
41- any text after it contains the expected type checking error messages.
42- Usually, ` # E: ` is preferred because it makes it easier to associate the
43- errors with the code generating them at a glance, and to change the code of
44- the test without having to change line numbers in ` [out] `
47+ any text after it contains the expected type checking error messages.
48+ Usually, ` # E: ` is preferred because it makes it easier to associate the
49+ errors with the code generating them at a glance, and to change the code of
50+ the test without having to change line numbers in ` [out] `
4551- an empty ` [out] ` section has no effect
4652- to add tests for a feature that hasn't been implemented yet, append ` -xfail `
4753 to the end of the test name
0 commit comments