Skip to content

Commit 13b7573

Browse files
authored
dev docs: Small tweaks in explaining test fixtures
1 parent 03f9521 commit 13b7573

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

test-data/unit/README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,19 @@ even though the code works when run manually, you should make sure you have
5555
all the stubs you need for your test case, including built-in classes such as
5656
`list` or `dict`, as these are not included by default.
5757

58-
- The builtins used by default in unit tests live in
59-
`test-data/unit/lib-stub`.
58+
Where the stubs for builtins come from for a given test:
6059

61-
- Individual test cases can override the stubs by using `[builtins
62-
fixtures/foo.pyi]`; this targets files in `test-data/unit/fixtures`; feel
63-
free to modify existing files there or create new ones as you deem fit.
60+
- The builtins used by default in unit tests live in
61+
`test-data/unit/lib-stub`.
6462

65-
- You are also free to add additional stubs to this directory, but
66-
generally don't update files in `lib-stub` without first discussing the
67-
addition with other mypy developers, as additions could slow down the test
68-
suite.
63+
- Individual test cases can override the stubs by using `[builtins fixtures/foo.pyi]`;
64+
this targets files in `test-data/unit/fixtures`. Feel free to modify existing files
65+
there or create new ones as you deem fit.
66+
67+
- Feel free to add additional stubs to that `fixtures` directory, but
68+
generally don't expand files in `lib-stub` without first discussing the
69+
addition with other mypy developers, as additions could slow down the test
70+
suite.
6971

7072

7173
Running tests and linting
@@ -165,4 +167,4 @@ Debian-derived system the command
165167
`apt-get install python3-dev libxml2-dev libxslt1-dev`
166168
may provide the necessary dependencies.
167169

168-
To use the feature, pass e.g. `--txt-report "$(mktemp -d)"`.
170+
To use the feature, pass e.g. `--txt-report "$(mktemp -d)"`.

0 commit comments

Comments
 (0)