mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Add pytest dependencies
@ -75,7 +75,7 @@ export DEBUG=1
|
||||
Install the dependencies required to run CI checks locally.
|
||||
|
||||
```sh
|
||||
conda install -c conda-forge expecttest pytest mypy=0.950 flake8 hypothesis
|
||||
conda install -c conda-forge expecttest pytest mypy=0.950 flake8 hypothesis pytest-cov pytest-xdist
|
||||
```
|
||||
|
||||
#### ONNX and ONNX Runtime
|
||||
@ -260,6 +260,12 @@ python test/onnx/test_pytorch_onnx_onnxruntime.py TestONNXRuntime_opset9.test_ar
|
||||
|
||||
An example of adding unit tests for a new symbolic function: [Add binary_cross_entropy_with_logits op](https://github.com/pytorch/pytorch/pull/49675)
|
||||
|
||||
You can use `pytest` to run tests in parallel and generate a coverage report.
|
||||
|
||||
```sh
|
||||
pytest -n auto --cov --cov-report "xml:test/coverage.xml" test/onnx/test_pytorch_onnx_onnxruntime.py
|
||||
```
|
||||
|
||||
# Links
|
||||
|
||||
- [User-facing docs](https://pytorch.org/docs/master/onnx.html).
|
||||
|
Reference in New Issue
Block a user