From 13b75737bb41d62ae4e7714704dcda3b446fa9f4 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Mon, 22 May 2017 15:47:56 -0700 Subject: [PATCH] dev docs: Small tweaks in explaining test fixtures --- test-data/unit/README.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/test-data/unit/README.md b/test-data/unit/README.md index 9dd87a91f597..4e42a064ae3a 100644 --- a/test-data/unit/README.md +++ b/test-data/unit/README.md @@ -55,17 +55,19 @@ even though the code works when run manually, you should make sure you have all the stubs you need for your test case, including built-in classes such as `list` or `dict`, as these are not included by default. - - The builtins used by default in unit tests live in - `test-data/unit/lib-stub`. +Where the stubs for builtins come from for a given test: - - Individual test cases can override the stubs by using `[builtins - fixtures/foo.pyi]`; this targets files in `test-data/unit/fixtures`; feel - free to modify existing files there or create new ones as you deem fit. +- The builtins used by default in unit tests live in + `test-data/unit/lib-stub`. - - You are also free to add additional stubs to this directory, but - generally don't update files in `lib-stub` without first discussing the - addition with other mypy developers, as additions could slow down the test - suite. +- Individual test cases can override the stubs by using `[builtins fixtures/foo.pyi]`; + this targets files in `test-data/unit/fixtures`. Feel free to modify existing files + there or create new ones as you deem fit. + +- Feel free to add additional stubs to that `fixtures` directory, but + generally don't expand files in `lib-stub` without first discussing the + addition with other mypy developers, as additions could slow down the test + suite. Running tests and linting @@ -165,4 +167,4 @@ Debian-derived system the command `apt-get install python3-dev libxml2-dev libxslt1-dev` may provide the necessary dependencies. -To use the feature, pass e.g. `--txt-report "$(mktemp -d)"`. \ No newline at end of file +To use the feature, pass e.g. `--txt-report "$(mktemp -d)"`.