commonsearch / cosr-back

Backend of Common Search. Analyses webpages and sends them to the index.
https://about.commonsearch.org
Apache License 2.0
122 stars 24 forks source link

Make coverage.py work with pyspark / spark-submit #39

Closed sylvinus closed 8 years ago

sylvinus commented 8 years ago

Currently our test coverage score is lower than it should be.

We are not collecting coverage information for the code running under spark-submit: https://github.com/commonsearch/cosr-back/blob/master/tests/sparktests/test_index.py#L79

We are already able to collect coverage data for subprocesses (we collect while doing make import_local_data https://github.com/commonsearch/cosr-back/blob/master/Makefile#L144), but pyspark seems to copy the job file in a temporary folder, which breaks coverage collection, probably because the filenames change and/or the pytest-cov.pth file is not executed?