Unverified Commit 4cd2590c authored by Min Xu's avatar Min Xu Committed by GitHub
Browse files

add pytest coverage (#24)


Co-authored-by: default avatarMin Xu <m1n@fb.com>
parent 7f3c07bb
...@@ -9,3 +9,5 @@ ...@@ -9,3 +9,5 @@
build/ build/
dist/ dist/
.coverage*
...@@ -65,6 +65,14 @@ mypy . ...@@ -65,6 +65,14 @@ mypy .
``` ```
pytest pytest
# single test
python -m pytest tests/nn/data_parallel/test_oss_ddp.py::test_on_cpu
```
### Check test coverage
```
python -m pytest --cov-report term --cov=fairscale/nn/data_parallel tests/nn/data_parallel/test_oss_ddp.py::test_on_cpu
``` ```
### CircleCI status ### CircleCI status
......
...@@ -3,6 +3,7 @@ flake8 == 3.7.9 ...@@ -3,6 +3,7 @@ flake8 == 3.7.9
isort == 4.3.21 isort == 4.3.21
mypy == 0.770 mypy == 0.770
pytest == 5.4.1 pytest == 5.4.1
pytest-cov == 2.10.0
torchtext == 0.6.0 torchtext == 0.6.0
torch == 1.5.1 torch == 1.5.1
# NOTE(msb) not a dependency but needed by torch # NOTE(msb) not a dependency but needed by torch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment