Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: testing coverage #16

Merged
merged 2 commits into from
Oct 16, 2019
Merged

add: testing coverage #16

merged 2 commits into from
Oct 16, 2019

Conversation

mgxd
Copy link
Member

@mgxd mgxd commented Oct 16, 2019

No description provided.

@mgxd
Copy link
Member Author

mgxd commented Oct 16, 2019

this is a weird one:

$ pytest -v --cov nitransforms --cov-config .coveragerc --cov-report xml:cov.xml --doctest-modules nitransforms
=========================================================================================================== test session starts ============================================================================================================
platform darwin -- Python 3.7.3, pytest-5.2.1, py-1.8.0, pluggy-0.12.0 -- /Users/mgxd/code/miniconda/bin/python
cachedir: .pytest_cache
rootdir: /Users/mgxd/code/nitransforms
plugins: xdist-1.30.0, forked-1.0.2, env-0.6.2, cov-2.8.1
[gw0] darwin Python 3.7.3 cwd: /Users/mgxd/code/nitransforms
[gw1] darwin Python 3.7.3 cwd: /Users/mgxd/code/nitransforms
[gw2] darwin Python 3.7.3 cwd: /Users/mgxd/code/nitransforms
[gw3] darwin Python 3.7.3 cwd: /Users/mgxd/code/nitransforms
[gw0] Python 3.7.3 (default, Mar 27 2019, 16:54:48)  -- [Clang 4.0.1 (tags/RELEASE_401/final)]
[gw1] Python 3.7.3 (default, Mar 27 2019, 16:54:48)  -- [Clang 4.0.1 (tags/RELEASE_401/final)]
[gw3] Python 3.7.3 (default, Mar 27 2019, 16:54:48)  -- [Clang 4.0.1 (tags/RELEASE_401/final)]
[gw2] Python 3.7.3 (default, Mar 27 2019, 16:54:48)  -- [Clang 4.0.1 (tags/RELEASE_401/final)]
gw0 [33] / gw1 [33] / gw2 [33] / gw3 [33]
scheduling tests via LoadScheduling
                                                                                                                                                                                                        
nitransforms/linear.py::nitransforms.linear.Affine.__init__ 
nitransforms/linear.py::nitransforms.linear.Affine.resample 
nitransforms/nonlinear.py::nitransforms.nonlinear.BSplineFieldTransform.resample 
nitransforms/nonlinear.py::nitransforms.nonlinear.DeformationFieldTransform.resample 
[gw0] [  3%] PASSED nitransforms/linear.py::nitransforms.linear.Affine.__init__ 
...                                                                                                                                                                 
nitransforms/tests/test_transform.py::test_apply_linear_transform[afni-LPS] SKIPPED                                                                                                                                                  [100%]

---------- coverage: platform darwin, python 3.7.3-final-0 -----------
Coverage XML written to file cov.xml
$ ls cov.xml
ls: cov.xml: No such file or directory

however, using pytest-xdist:

$ pytest -v -n auto --cov nitransforms --cov-config .coveragerc --cov-report xml:cov.xml --doctest-modules nitransforms
=========================================================================================================== test session starts ============================================================================================================
platform darwin -- Python 3.7.3, pytest-5.2.1, py-1.8.0, pluggy-0.12.0 -- /Users/mgxd/code/miniconda/bin/python
cachedir: .pytest_cache
rootdir: /Users/mgxd/code/nitransforms
plugins: xdist-1.30.0, forked-1.0.2, env-0.6.2, cov-2.8.1
collected 33 items                                                                                                                                                                                                                         

nitransforms/linear.py::nitransforms.linear.Affine.__init__ PASSED                                                                                                                                                                   [  3%]
...
nitransforms/tests/test_transform.py::test_apply_linear_transform[afni-LPS] SKIPPED                                                                                                                                                  [100%]

---------- coverage: platform darwin, python 3.7.3-final-0 -----------
Coverage XML written to file cov.xml
$ ls cov.xml 
cov.xml

EDIT: fixed with absolute path

@mgxd
Copy link
Member Author

mgxd commented Oct 16, 2019

i think you'll have to add this repo for full support

@mgxd mgxd merged commit dce8b4c into nipy:master Oct 16, 2019
@mgxd mgxd deleted the tst/cov branch October 31, 2019 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant