mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
improve test_docs_coverage error messages (#21029)
Summary: Most important fix: Correct "tensor.rst" to "tensors.rst" Secondary fix: some minor English spelling/grammar fixes. Pull Request resolved: https://github.com/pytorch/pytorch/pull/21029 Differential Revision: D15523230 Pulled By: umanwizard fbshipit-source-id: 6052d8609c86efa41a4289cd3a099b2f1037c810
This commit is contained in:
parent
e13b483f58
commit
8c927b208c
|
|
@ -60,16 +60,16 @@ class TestDocCoverage(unittest.TestCase):
|
|||
has_docstring & whitelist, whitelist,
|
||||
textwrap.dedent('''
|
||||
The whitelist in test_docs_coverage.py contains something
|
||||
that don't have docstring or not in torch.*. If you just
|
||||
removed something from torch.*, please remove it from whiltelist
|
||||
that doesn't have a docstring or isn't in torch.*. If you just
|
||||
removed something from torch.*, please remove it from the whitelist
|
||||
in test_docs_coverage.py'''))
|
||||
has_docstring -= whitelist
|
||||
# assert they are equal
|
||||
self.assertEqual(
|
||||
has_docstring, in_rst,
|
||||
textwrap.dedent('''
|
||||
List of functions documented in torch.rst and in python are different.
|
||||
Do you forget to add new thing to torch.rst, or whitelist things you
|
||||
The lists of functions documented in torch.rst and in python are different.
|
||||
Did you forget to add a new thing to torch.rst, or whitelist things you
|
||||
don't want to document?''')
|
||||
)
|
||||
|
||||
|
|
@ -80,8 +80,8 @@ class TestDocCoverage(unittest.TestCase):
|
|||
self.assertEqual(
|
||||
has_docstring, in_rst,
|
||||
textwrap.dedent('''
|
||||
List of tensor methods documented in tensor.rst and in python are
|
||||
different. Do you forget to add new thing to tensor.rst, or whitelist
|
||||
The lists of tensor methods documented in tensors.rst and in python are
|
||||
different. Did you forget to add a new thing to tensors.rst, or whitelist
|
||||
things you don't want to document?''')
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user