Skip to content

Commit

Permalink
[SPARK-38894][PYTHON][TESTS] Exclude pyspark.cloudpickle in test cove…
Browse files Browse the repository at this point in the history
…rage report

### What changes were proposed in this pull request?

This PR proposes to remove the test coverage report for `pyspark.cloudpickle` (https://codecov.io/gh/apache/spark/tree/master/python/pyspark/cloudpickle).

### Why are the changes needed?

`pyspark.cloudpickle` is actually a copy from [cloudpickle](https://github.com/cloudpipe/cloudpickle) as is. We don't need to check test coverage duplicately here.

### Does this PR introduce _any_ user-facing change?

No, dev-only.

### How was this patch tested?

Manually tested, and verified the site and console output:

```bash
cd python
./run-tests-with-coverage --python-executables=python3 --modules=pyspark-sql
```

and

```
open test_coverage/htmlcov/index.html
```

Closes apache#36191 from HyukjinKwon/SPARK-38894.

Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
  • Loading branch information
HyukjinKwon committed Apr 14, 2022
1 parent 22cd0c2 commit 31d3160
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/run-tests-with-coverage
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ find $COVERAGE_DIR/coverage_data -size 0 -print0 | xargs -0 rm -fr
echo "Combining collected coverage data under $COVERAGE_DIR/coverage_data"
$COV_EXEC combine
echo "Creating XML report file at python/coverage.xml"
$COV_EXEC xml --ignore-errors --include "pyspark/*"
$COV_EXEC xml --ignore-errors --include "pyspark/*" --omit "pyspark/cloudpickle/*"
echo "Reporting the coverage data at $COVERAGE_DIR/coverage_data/coverage"
$COV_EXEC report --include "pyspark/*"
$COV_EXEC report --include "pyspark/*" --omit "pyspark/cloudpickle/*"
echo "Generating HTML files for PySpark coverage under $COVERAGE_DIR/htmlcov"
$COV_EXEC html --ignore-errors --include "pyspark/*" --directory "$COVERAGE_DIR/htmlcov"
$COV_EXEC html --ignore-errors --include "pyspark/*" --directory "$COVERAGE_DIR/htmlcov" --omit "pyspark/cloudpickle/*"

popd

0 comments on commit 31d3160

Please sign in to comment.