-
Notifications
You must be signed in to change notification settings - Fork 593
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
Use coverage erase and add htmlcov to .gitignore #288
Conversation
run-coverage
Outdated
@@ -10,7 +10,7 @@ except ImportError: | |||
print('\nYou need to install the coverage module first, e.g. \n$ pip2 install coverage\n') | |||
exit(1)" | |||
|
|||
rm -rf .coverage* | |||
$COVERAGE erase | |||
PATH=$PWD:$PATH $COVERAGE run -p --include=$PWD/ocropus-*,$PWD/**/* ./tests/run-unit |
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.
Currently, the problem is that the import ocrolib
in ./tests/run-unit
will use the files in /usr/local/lib/python2.7/dist-packages/ocrolib/
and not the local one. I guess this is different for the ocropus-*
scripts, because they are one directory level up. @kba Any ideas how to fix this? Do we have to adjust the PATH variable here?
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.
You can set [paths]
in coverage config, then run coverage combine
to flatten the paths into the first canonical path.
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.
Thank you! Yes, that seems to work. I guess that the PATH construct can be deleted then as well...
run-coverage
Outdated
@@ -10,7 +10,7 @@ except ImportError: | |||
print('\nYou need to install the coverage module first, e.g. \n$ pip2 install coverage\n') | |||
exit(1)" | |||
|
|||
rm -rf .coverage* | |||
$COVERAGE erase | |||
PATH=$PWD:$PATH $COVERAGE run -p --include=$PWD/ocropus-*,$PWD/**/* ./tests/run-unit | |||
PATH=$PWD:$PATH RUNNER="$COVERAGE run -p --include=$PWD/ocropus-*,$PWD/**/*" ./run-test-ci |
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 we need the include here? It works also without and maybe is better not to restrict that further...?
No description provided.