@@ -343,7 +343,13 @@ contains the example docstring to the [documentation_tests.txt](../utils/documen
...
@@ -343,7 +343,13 @@ contains the example docstring to the [documentation_tests.txt](../utils/documen
### For Python files
### For Python files
You can run all the tests in the docstrings of a given file with the following command, here is how we test the modeling file of Wav2Vec2 for instance:
You will first need to run the following command (from the root of the repository) to prepare the doc file (doc-testing needs to add additional lines that we don't include in the doc source files):
```bash
python utils/prepare_for_doc_test.py src docs
```
Then you can run all the tests in the docstrings of a given file with the following command, here is how we test the modeling file of Wav2Vec2 for instance:
Once you're done, you can run the following command (still from the root of the repository) to undo the changes made by the first command before committing:
You will first need to run the following command (from the root of the repository) to prepare the doc file (doc-testing needs to add additional lines that we don't include in the doc source files):
You will first need to run the following command (from the root of the repository) to prepare the doc file (doc-testing needs to add additional lines that we don't include in the doc source files):