-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-4002 No module named coverage.__main__ #1398
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
3c9353b
93831f3
c801557
a5c1564
e2b194c
47dec93
8c73802
e68b9f4
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
# | ||
# Coverage combine merges (and removes) all the coverage files and | ||
# generates a new .coverage file in the current directory. | ||
|
||
set -o xtrace # Write all commands first to stderr | ||
set -o errexit # Exit the script with error if any of the commands fail | ||
|
||
. .evergreen/utils.sh | ||
|
||
if [ -z "$PYTHON_BINARY" ]; then | ||
PYTHON_BINARY=$(find_python3) | ||
fi | ||
|
||
createvirtualenv "$PYTHON_BINARY" covenv | ||
# coverage 7.3 dropped support for Python 3.7, keep in sync with run-tests.sh | ||
pip install -q "coverage<7.3" | ||
|
||
pip list | ||
ls -la coverage/ | ||
|
||
python -m coverage combine coverage/coverage.* | ||
python -m coverage html -d htmlcov |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -258,7 +258,8 @@ python -c 'import sys; print(sys.version)' | |
# Only cover CPython. PyPy reports suspiciously low coverage. | ||
PYTHON_IMPL=$($PYTHON -c "import platform; print(platform.python_implementation())") | ||
if [ -n "$COVERAGE" ] && [ "$PYTHON_IMPL" = "CPython" ]; then | ||
python -m pip install pytest-cov "coverage" | ||
# coverage 7.3 dropped support for Python 3.7, keep in sync with combine-coverage.sh. | ||
python -m pip install pytest-cov "coverage<7.3" | ||
Comment on lines
+261
to
+262
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. Could we see a world where we have a version of python or dependent libraries that's incompatible with coverage<7.3? I don't imagine that's likely considering the python release schedules, and our support timelines but just curious. 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. Eventually, yes. We'll do a |
||
TEST_ARGS="$TEST_ARGS --cov pymongo --cov-branch --cov-report term-missing:skip-covered" | ||
fi | ||
|
||
|
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.
Are these two just for capturing the information in our logs?
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.
Yep