-
Notifications
You must be signed in to change notification settings - Fork 528
Pytest with 89% coverage #19
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
Changes from all commits
b2f91f2
c6e648f
a31d3c2
f8e822c
7d9c5e7
709d8cb
83ecc6d
64cf2fc
33f3d30
bd705ed
f204e98
5aad08a
a8d7301
e11b1d1
11f0652
46f297f
68d7490
67b011a
347e628
4a45135
2bc41ad
6a02db0
86418eb
286de0a
0e06129
81118f2
109fc2a
e0fa14b
d101e08
77037cc
fac003d
0097017
251af8e
84aa318
96f8b96
838550e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,3 +100,6 @@ ENV/ | |
|
||
# Mac stuff | ||
.DS_Store | ||
|
||
# coverage output folder | ||
cov_html/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,10 +38,10 @@ pep8 : | |
flake8 examples/ ot/ test/ | ||
|
||
test : FORCE pep8 | ||
python -m py.test -v test/ | ||
python -m py.test -v test/ --cov=ot --cov-report html:cov_html | ||
|
||
pytest : FORCE | ||
python -m py.test -v test/ | ||
python -m py.test -v test/ --cov=ot | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you should have a native pytest command: pytest -v test/ --cov=ot There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Under Debian/Ubuntu logilab-common install a useless executable named pytest. It's a well known bug but takes time to be corrected. This line ensure that the proper py.test is executed. |
||
|
||
uploadpypi : | ||
#python setup.py register | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you use only matplotlib? if so just use the Agg backend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to use the Agg backedn here
https://github.com/rflamary/POT/blob/pytest/test/test_plot.py
but travis still failed with DISPLAY error
https://travis-ci.org/rflamary/POT/builds/256924206
maybe the test_plot.py is not good but I don't see the problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's weird. You seem to have done it right. Are you sure matplotlib is not imported anywhere before?
you should also nest the imports to matplotlib in the or source tree. So matplotlib is not imported when you do
import ot