Closed shepherdjay closed 7 years ago
@dharmab - If you have a free moment I'm not sure why it is saying no module "named" on the CI test. Works fine in pycharm but there could be some pycharm magic going on.
this is my attempt at packaging up this project for distribution
nope travis.ci didn't like that either.
Your tests are using relative imports, which require the test to be run from the correct directory. On my system py.text --cov
only works if I'm in the ipfromwebpage
directory. By default, Travis runs commands in the project root.
Possible solutions:
travis.yml
to change directories before running tests (See https://stackoverflow.com/questions/14468464/how-to-specify-a-build-folder-in-travis)Ah, I misled you. Should be tests
, not ipfromwebpage
Aha! pytest
has weird behavior when running in a virtualenv: https://docs.pytest.org/en/latest/goodpractices.html#tox
Disregard the above directory comment, and then add pip install -e .
to your travis.yml
before running tests. This temporarily installs the module so that the test can import it.
That seems to have worked. - The failure was a result of not grabbing the coverage reports which is separate issue i'll work on. Packaging is annoying.....
It seems like the google's are mostly favoring tox instead of purely running py.test from Travis. I've never used Tox but will look into it.
Merging #8 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #8 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 142 54 -88
Branches 9 8 -1
=====================================
- Hits 142 54 -88
Impacted Files | Coverage Δ | |
---|---|---|
ipfromwebpage/ipfromwebpage.py | 100% <ø> (ø) |
|
ipfromwebpage/__init__.py | 100% <100%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update eb28e48...9285964. Read the comment docs.
Recent commit fixed codecov ready to merge
Packaged version for pypi