diff options
| author | za <za@python.or.id> | 2016-10-27 14:53:39 +0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-11-10 21:30:21 -0500 |
| commit | 321e94fa41b121f65c02119c02098df327bbd569 (patch) | |
| tree | ce5476c191d589aca4b124f841dfbccac8dd299f /docs/internals/contributing/writing-code | |
| parent | 4bb70cbcc60794f515c9bfefeca87b8272d33c0c (diff) | |
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
Diffstat (limited to 'docs/internals/contributing/writing-code')
| -rw-r--r-- | docs/internals/contributing/writing-code/coding-style.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/internals/contributing/writing-code/coding-style.txt b/docs/internals/contributing/writing-code/coding-style.txt index 39f49f10e6..7b7712919b 100644 --- a/docs/internals/contributing/writing-code/coding-style.txt +++ b/docs/internals/contributing/writing-code/coding-style.txt @@ -53,6 +53,19 @@ Python style (``six.assertRaisesRegex()`` as long as we support Python 2) only if you need to use regular expression matching. +* In test docstrings, state the expected behavior that each test demonstrates. + Don't include preambles such as "Tests that" or "Ensures that". + + Reserve ticket references for obscure issues where the ticket has additional + details that can't be easily described in docstrings or comments. Include the + ticket number at the end of a sentence like this:: + + def test_foo(): + """ + A test docstring looks like this (#123456). + """ + ... + .. _coding-style-imports: Imports |
